From 77be8b1240dc082df1d7c05bf95f01337e09cb5f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 15 May 2012 09:26:10 +0200 Subject: 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. --- libvo/cocoa_common.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m index 5b2bc9ab4e..581b5605ec 100644 --- a/libvo/cocoa_common.m +++ b/libvo/cocoa_common.m @@ -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; -- cgit v1.2.3