[Scummvm-tracker] [ScummVM :: Bugs] #15531: GRIM: Manny completely black in first demo room on MacBook Air M1 (OpenGL renderer)
ScummVM :: Bugs
trac at scummvm.org
Tue Mar 10 15:48:23 UTC 2026
#15531: GRIM: Manny completely black in first demo room on MacBook Air M1 (OpenGL
renderer)
-----------------------------------+----------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: high | Component: Engine: Grim
Version: | Resolution:
Keywords: rendering issue,opengl | Game: Grim Fandango
-----------------------------------+----------------------------
Comment (by dwatteau):
FWIW, after some tests, this bug seems related to some interaction when
the `cutoff` values (when non-`180`) given to the nearly GL_SPOT_CUTOFF
`glLightf()` call:
{{{
void GfxOpenGL::setupLight(Light *light, int lightId) {
// [...]
} else if (light->_type == Light::Spot) {
lightPos[0] = light->_pos.x();
lightPos[1] = light->_pos.y();
lightPos[2] = light->_pos.z();
lightDir[0] = light->_dir.x();
lightDir[1] = light->_dir.y();
lightDir[2] = light->_dir.z();
spot_exp = 2.0f;
cutoff = light->_penumbraangle; // <== HERE
q_attenuation = 0.0f;
}
// [...]
}
}}}
although this may seem obvious to some, reading criezy's observation
again, eh ;)
I'm not sure how this could be worked around, if this indeed is a bug in
Apple's emulation of OpenGL through Metal, on (early?) Apple silicon.
Maybe we can keep the OpenGL-with-shaders renderer the default there, when
the release supports it.
{{{
diff --git a/engines/grim/grim.cpp b/engines/grim/grim.cpp
index 8c4d9c8e749..f125c3f9f49 100644
--- a/engines/grim/grim.cpp
+++ b/engines/grim/grim.cpp
@@ -280,12 +280,16 @@ GfxBase *GrimEngine::createRenderer(int screenW, int
screenH) {
availableRendererTypes &= ~Graphics::kRendererTypeTinyGL;
}
+ // HACK: Bug #15531: Not enabling the following on Apple silicon
desktops,
+ // as GL_SPOT_CUTOFF glLightf() calls have issues on non-Intel
Metal GPUs.
+#if !(defined(MACOSX) && defined(__aarch64__))
// For Grim Fandango, OpenGL renderer without shaders is preferred
if available
if (desiredRendererType == Graphics::kRendererTypeDefault &&
(availableRendererTypes & Graphics::kRendererTypeOpenGL)
&&
- getGameType() == GType_GRIM) {
+ getGameType() == GType_GRIM) {
availableRendererTypes &=
~Graphics::kRendererTypeOpenGLShaders;
}
+#endif
// Not supported yet.
if (getLanguage() == Common::Language::ZH_CHN || getLanguage() ==
Common::Language::ZH_TWN
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/15531#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list