Add support for RF_ALWAYSONTOP in OpenGL

This commit is contained in:
NepDisk 2025-07-26 18:22:11 -04:00
parent 6a8bfca4e8
commit 6b5a9cdd1e

View file

@ -3440,6 +3440,11 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
return; // cap
blend = HWR_SurfaceBlend(blendmode, trans, &Surf);
// if sprite has PF_ALWAYSONTOP, draw on top of everything.
if (cv_debugrender_spriteclip.value || spr->mobj->renderflags & RF_ALWAYSONTOP)
blend |= PF_NoDepthTest;
if (!trans && !blendmode)
{
// BP: i agree that is little better in environement but it don't
@ -3937,6 +3942,11 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
return; // cap
blend = HWR_SurfaceBlend(blendmode, trans, &Surf);
// if sprite has PF_ALWAYSONTOP, draw on top of everything.
if (cv_debugrender_spriteclip.value || spr->mobj->renderflags & RF_ALWAYSONTOP)
blend |= PF_NoDepthTest;
if (!trans && !blendmode)
{
// BP: i agree that is little better in environement but it don't