diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp index c29cf6074d3..879a839178d 100644 --- a/engines/grim/gfx_opengl.cpp +++ b/engines/grim/gfx_opengl.cpp @@ -487,6 +487,9 @@ void GfxOpenGL::startActorDraw(const Actor *actor) { } if (g_grim->getGameType() == GType_MONKEY4) { + glEnable(GL_CULL_FACE); + glFrontFace(GL_CW); + if (actor->isInOverworld()) { const Math::Vector3d &pos = actor->getWorldPos(); const Math::Quaternion &quat = actor->getRotationQuat(); @@ -547,6 +550,9 @@ void GfxOpenGL::finishActorDraw() { glColor3f(1.0f, 1.0f, 1.0f); glDisable(GL_POLYGON_OFFSET_FILL); } + if (g_grim->getGameType() == GType_MONKEY4) { + glDisable(GL_CULL_FACE); + } glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); _currentActor = nullptr; } diff --git a/engines/grim/gfx_opengl_shaders.cpp b/engines/grim/gfx_opengl_shaders.cpp index f620e475115..1234bf39f67 100644 --- a/engines/grim/gfx_opengl_shaders.cpp +++ b/engines/grim/gfx_opengl_shaders.cpp @@ -508,6 +508,9 @@ void GfxOpenGLS::startActorDraw(const Actor *actor) { const float alpha = actor->getEffectiveAlpha(); if (g_grim->getGameType() == GType_MONKEY4) { + glEnable(GL_CULL_FACE); + glFrontFace(GL_CW); + const Math::Matrix4 &viewMatrix = _currentQuat.toMatrix(); Math::Matrix4 modelMatrix = actor->getFinalMatrix(); modelMatrix.transpose(); @@ -589,6 +592,9 @@ void GfxOpenGLS::startActorDraw(const Actor *actor) { void GfxOpenGLS::finishActorDraw() { _currentActor = NULL; glDisable(GL_POLYGON_OFFSET_FILL); + if (g_grim->getGameType() == GType_MONKEY4) { + glDisable(GL_CULL_FACE); + } } void GfxOpenGLS::setShadow(Shadow *shadow) { diff --git a/engines/grim/gfx_tinygl.cpp b/engines/grim/gfx_tinygl.cpp index 6e8a2206903..c3cd73e2ba5 100644 --- a/engines/grim/gfx_tinygl.cpp +++ b/engines/grim/gfx_tinygl.cpp @@ -615,6 +615,9 @@ void GfxTinyGL::startActorDraw(const Actor *actor) { const float &scale = actor->getScale(); if (g_grim->getGameType() == GType_MONKEY4) { + tglEnable(TGL_CULL_FACE); + tglFrontFace(TGL_CW); + if (actor->isInOverworld()) { const Math::Vector3d &pos = actor->getWorldPos(); tglMatrixMode(TGL_PROJECTION); @@ -686,6 +689,10 @@ void GfxTinyGL::finishActorDraw() { } }*/ + if (g_grim->getGameType() == GType_MONKEY4) { + tglDisable(TGL_CULL_FACE); + } + tglColorMask(TGL_TRUE, TGL_TRUE, TGL_TRUE, TGL_TRUE); _currentActor = nullptr; }