1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Set OpenGL context major and minor version in OGLVideoMupenPlus::_setAttributes()

This commit is contained in:
Sergey Lipskiy 2015-05-14 11:45:41 +06:00
parent 82a2d65018
commit 5b1a50ecb7

View File

@ -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);