Mirroring should be flipped on HUD models since the view to world space transform already inverts one axis

This commit is contained in:
Marisa Kirisame 2018-06-03 14:06:59 +02:00 committed by Christoph Oelckers
parent f03c02df43
commit f74e74ac4b
3 changed files with 3 additions and 3 deletions

View file

@ -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_CCW : GL_CW);
glFrontFace((mirrored ^ GLPortal::isMirrored()) ? GL_CW : GL_CCW);
}
gl_RenderState.mModelMatrix = objectToWorldMatrix;

View file

@ -109,7 +109,7 @@ void PolyModelRenderer::BeginDrawHUDModel(AActor *actor, const VSMatrix &objectT
if (actor->RenderStyle == LegacyRenderStyles[STYLE_Normal])
PolyTriangleDrawer::SetTwoSided(Thread->DrawQueue, true);
PolyTriangleDrawer::SetCullCCW(Thread->DrawQueue, !mirrored);
PolyTriangleDrawer::SetCullCCW(Thread->DrawQueue, mirrored);
}
void PolyModelRenderer::EndDrawHUDModel(AActor *actor)

View file

@ -194,7 +194,7 @@ namespace swrenderer
if (actor->RenderStyle == LegacyRenderStyles[STYLE_Normal])
PolyTriangleDrawer::SetTwoSided(Thread->DrawQueue, true);
PolyTriangleDrawer::SetCullCCW(Thread->DrawQueue, !mirrored);
PolyTriangleDrawer::SetCullCCW(Thread->DrawQueue, mirrored);
}
void SWModelRenderer::EndDrawHUDModel(AActor *actor)