Swap front face culling for GL model drawer (CCW should be the default).

Added mirroring handling to software models.
This commit is contained in:
Mari the Deer 2018-06-03 02:27:28 +02:00 committed by Christoph Oelckers
commit dea1d0259d
3 changed files with 10 additions and 2 deletions

View file

@ -65,7 +65,7 @@ void FGLModelRenderer::BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, con
if (!(actor->RenderStyle == LegacyRenderStyles[STYLE_Normal]) && !(smf->flags & MDL_DONTCULLBACKFACES))
{
glEnable(GL_CULL_FACE);
glFrontFace((mirrored ^ GLPortal::isMirrored()) ? GL_CW : GL_CCW);
glFrontFace((mirrored ^ GLPortal::isMirrored()) ? GL_CCW : GL_CW);
}
gl_RenderState.mModelMatrix = objectToWorldMatrix;
@ -91,7 +91,7 @@ void FGLModelRenderer::BeginDrawHUDModel(AActor *actor, const VSMatrix &objectTo
if (!(actor->RenderStyle == LegacyRenderStyles[STYLE_Normal]))
{
glEnable(GL_CULL_FACE);
glFrontFace((mirrored ^ GLPortal::isMirrored()) ? GL_CW : GL_CCW);
glFrontFace((mirrored ^ GLPortal::isMirrored()) ? GL_CCW : GL_CW);
}
gl_RenderState.mModelMatrix = objectToWorldMatrix;