@@ -147,10 +147,11 @@ MelonDsDs::OpenGLRenderState::OpenGLRenderState() {
147147 retro::debug (TracyFunction);
148148 glsm_ctx_params_t params = {};
149149
150- // MelonDS DS wants an opengl 3.1 context, so glcore is required for mesa compatibility
151- params.context_type = RETRO_HW_CONTEXT_OPENGL;
150+ // MelonDS needs at least OpenGL 3.2 for OpenGL renderer
151+ // (it doesn't use the legacy fixed-function pipeline)
152+ params.context_type = RETRO_HW_CONTEXT_OPENGL_CORE;
152153 params.major = 3 ;
153- params.minor = 1 ;
154+ params.minor = 2 ;
154155 params.context_reset = HardwareContextReset;
155156 params.context_destroy = HardwareContextDestroyed;
156157 params.environ_cb = retro::environment;
@@ -219,11 +220,8 @@ void MelonDsDs::OpenGLRenderState::ContextReset(melonDS::NDS& nds, const CoreCon
219220
220221 uintptr_t fbo = glsm_get_current_framebuffer ();
221222 retro_assert (glIsFramebuffer (fbo) == GL_TRUE);
222- retro::debug (" Current OpenGL framebuffer: {}" , fbo);
223-
224223 GLenum status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
225- retro::debug (" Framebuffer status: {}" , static_cast <FormattedGLEnum>(status));
226- retro_assert (status == GL_FRAMEBUFFER_COMPLETE);
224+ retro::debug (" Current OpenGL framebuffer: id={}, status={}" , fbo, static_cast <FormattedGLEnum>(status));
227225
228226 // Initialize global OpenGL resources (e.g. VAOs) and get config info (e.g. limits)
229227 retro::debug (" Setting up GL state" );
0 commit comments