mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Set OpenGL context major and minor version in OGLVideoMupenPlus::_setAttributes()
This commit is contained in:
parent
82a2d65018
commit
5b1a50ecb7
|
@ -38,6 +38,21 @@ OGLVideo & OGLVideo::get()
|
||||||
|
|
||||||
void OGLVideoMupenPlus::_setAttributes()
|
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_DOUBLEBUFFER, 1);
|
||||||
CoreVideo_GL_SetAttribute(M64P_GL_SWAP_CONTROL, config.video.verticalSync);
|
CoreVideo_GL_SetAttribute(M64P_GL_SWAP_CONTROL, config.video.verticalSync);
|
||||||
CoreVideo_GL_SetAttribute(M64P_GL_BUFFER_SIZE, 32);
|
CoreVideo_GL_SetAttribute(M64P_GL_BUFFER_SIZE, 32);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user