mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 01:21:17 +00:00
Mirroring should be flipped on HUD models since the view to world space transform already inverts one axis
(cherry picked from commit f74e74ac4b
)
This commit is contained in:
parent
5a76623993
commit
1afcd9b7c7
3 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue