mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 11:42:04 +00:00
cocoa: gl3: make window creation fail on <10.7
Versions of OSX prior to 10.7 do not support OpenGL 3. Fail the window creation when that is the case.
This commit is contained in:
parent
43337db0a4
commit
77be8b1240
@ -250,6 +250,11 @@ int vo_cocoa_create_window(struct vo *vo, uint32_t d_width,
|
||||
if (is_lion_or_better()) {
|
||||
attr[i++] = NSOpenGLPFAOpenGLProfile;
|
||||
attr[i++] = (gl3profile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy);
|
||||
} else if(gl3profile) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR,
|
||||
"[cocoa] Invalid pixel format attribute "
|
||||
"(GL3 is not supported on OSX versions prior to 10.7)\n");
|
||||
return -1;
|
||||
}
|
||||
attr[i++] = NSOpenGLPFADoubleBuffer; // double buffered
|
||||
attr[i++] = NSOpenGLPFADepthSize;
|
||||
|
Loading…
Reference in New Issue
Block a user