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:
Stefano Pigozzi 2012-05-15 09:26:10 +02:00
parent 43337db0a4
commit 77be8b1240
1 changed files with 5 additions and 0 deletions

View File

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