mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Cocoa) Try to support Core GL 3.1/3.2/3.3 and 4.1 on OSX 10.7 and
10.10 respectively
This commit is contained in:
parent
688414c5bb
commit
f5a12d63cc
@ -313,17 +313,32 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data,
|
|||||||
[g_view setWantsBestResolutionOpenGLSurface:YES];
|
[g_view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
|
|
||||||
NSOpenGLPixelFormatAttribute attributes [] = {
|
NSOpenGLPixelFormatAttribute attributes [] = {
|
||||||
NSOpenGLPFAColorSize, 24,
|
NSOpenGLPFAColorSize,
|
||||||
|
24,
|
||||||
NSOpenGLPFADoubleBuffer,
|
NSOpenGLPFADoubleBuffer,
|
||||||
NSOpenGLPFAAllowOfflineRenderers,
|
NSOpenGLPFAAllowOfflineRenderers,
|
||||||
NSOpenGLPFADepthSize,
|
NSOpenGLPFADepthSize,
|
||||||
(NSOpenGLPixelFormatAttribute)16, // 16 bit depth buffer
|
(NSOpenGLPixelFormatAttribute)16, // 16 bit depth buffer
|
||||||
#ifdef MAC_OS_X_VERSION_10_7
|
0, /* profile */
|
||||||
(g_major || g_minor) ? NSOpenGLPFAOpenGLProfile : 0,
|
0, /* profile enum */
|
||||||
(g_major << 12) | (g_minor << 8),
|
|
||||||
#endif
|
|
||||||
(NSOpenGLPixelFormatAttribute)0
|
(NSOpenGLPixelFormatAttribute)0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef MAC_OS_X_VERSION_10_7
|
||||||
|
if (g_major == 3 && (g_minor >= 1 && g_minor <= 3))
|
||||||
|
{
|
||||||
|
attributes[6] = NSOpenGLPFAOpenGLProfile;
|
||||||
|
attributes[7] = NSOpenGLProfileVersion3_2Core;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MAC_OS_X_VERSION_10_10
|
||||||
|
if (g_major == 4 && g_minor == 1)
|
||||||
|
{
|
||||||
|
attributes[6] = NSOpenGLPFAOpenGLProfile;
|
||||||
|
attributes[7] = NSOpenGLProfileVersion4_1Core;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
g_format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
g_format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user