- started cleanup of dependencies of the framebuffer class.

* made the portal state global, outside the framebuffer, because it is pure logic state without dependencies on the backend.
* took the setup functions out of FDynLightData - there is no need to have them as members and they age game dependent.
This commit is contained in:
Christoph Oelckers 2020-04-25 21:08:07 +02:00
commit 59360f2d77
16 changed files with 46 additions and 36 deletions

View file

@ -62,7 +62,7 @@ void FHWModelRenderer::BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, con
// TO-DO: Implement proper depth sorting.
if (!(actor->RenderStyle == DefaultRenderStyle()) && !(smf->flags & MDL_DONTCULLBACKFACES))
{
state.SetCulling((mirrored ^ screen->mPortalState->isMirrored()) ? Cull_CCW : Cull_CW);
state.SetCulling((mirrored ^ portalState.isMirrored()) ? Cull_CCW : Cull_CW);
}
state.mModelMatrix = objectToWorldMatrix;
@ -86,7 +86,7 @@ void FHWModelRenderer::BeginDrawHUDModel(AActor *actor, const VSMatrix &objectTo
// TO-DO: Implement proper depth sorting.
if (!(actor->RenderStyle == DefaultRenderStyle()))
{
state.SetCulling((mirrored ^ screen->mPortalState->isMirrored()) ? Cull_CW : Cull_CCW);
state.SetCulling((mirrored ^ portalState.isMirrored()) ? Cull_CW : Cull_CCW);
}
state.mModelMatrix = objectToWorldMatrix;