diff --git a/src/mupenplus/OpenGL_mupenplus.cpp b/src/mupenplus/OpenGL_mupenplus.cpp index 8549760a1..7bf0d8942 100644 --- a/src/mupenplus/OpenGL_mupenplus.cpp +++ b/src/mupenplus/OpenGL_mupenplus.cpp @@ -38,6 +38,21 @@ OGLVideo & OGLVideo::get() void OGLVideoMupenPlus::_setAttributes() { +#ifdef GLES2 + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MAJOR_VERSION, 2); + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MINOR_VERSION, 0); +#elif defined(GLES3) + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MAJOR_VERSION, 3); + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MINOR_VERSION, 0); +#elif defined(GLES3_1) + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MAJOR_VERSION, 3); + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MINOR_VERSION, 1); +#elif defined(OS_MAC_OS_X) + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MAJOR_VERSION, 3); + CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MINOR_VERSION, 2); +#else + // Do nothing +#endif CoreVideo_GL_SetAttribute(M64P_GL_DOUBLEBUFFER, 1); CoreVideo_GL_SetAttribute(M64P_GL_SWAP_CONTROL, config.video.verticalSync); CoreVideo_GL_SetAttribute(M64P_GL_BUFFER_SIZE, 32);