- implement per-renderer sprite hiding based on the actor's render feature flags

- hook the thing up to zscript (does not currently compile)
This commit is contained in:
Rachael Alexanderson 2017-07-29 13:59:36 -04:00
commit 712d21e26a
4 changed files with 37 additions and 0 deletions

View file

@ -32,6 +32,7 @@
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR(Int, r_drawfuzz)
extern uint32_t r_renderercaps;
bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
{
@ -176,6 +177,12 @@ bool RenderPolySprite::IsThingCulled(AActor *thing)
return true;
}
// check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature,
// check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it.
if ((!!((uint32_t)(thing->renderrequired) & ~r_renderercaps)) ||
(!!((uint32_t)(thing->renderhidden) & r_renderercaps)))
return true;
return false;
}