equal
deleted
inserted
replaced
35 AGLPixelFormat format; |
35 AGLPixelFormat format; |
36 int i = 0; |
36 int i = 0; |
37 GLint attributes [ 24 ]; /* 24 is max possible in this setup */ |
37 GLint attributes [ 24 ]; /* 24 is max possible in this setup */ |
38 GLboolean noerr; |
38 GLboolean noerr; |
39 |
39 |
|
40 /* load the gl driver from a default path */ |
|
41 if ( ! this->gl_config.driver_loaded ) { |
|
42 /* no driver has been loaded, use default (ourselves) */ |
|
43 if ( Mac_GL_LoadLibrary(this, NULL) < 0 ) { |
|
44 return(-1); |
|
45 } |
|
46 } |
|
47 |
40 attributes[i++] = AGL_RGBA; |
48 attributes[i++] = AGL_RGBA; |
41 if ( this->gl_config.red_size != 0 && |
49 if ( this->gl_config.red_size != 0 && |
42 this->gl_config.blue_size != 0 && |
50 this->gl_config.blue_size != 0 && |
43 this->gl_config.green_size != 0 ) { |
51 this->gl_config.green_size != 0 ) { |
44 attributes[i++] = AGL_RED_SIZE; |
52 attributes[i++] = AGL_RED_SIZE; |
102 return(-1); |
110 return(-1); |
103 } |
111 } |
104 aglDestroyPixelFormat(format); |
112 aglDestroyPixelFormat(format); |
105 |
113 |
106 #if TARGET_API_MAC_CARBON |
114 #if TARGET_API_MAC_CARBON |
107 noerr = aglSetDrawable(glContext, GetWindowPort(SDL_Window)); |
115 noerr = aglSetDrawable(glContext, GetWindowPort(SDL_Window)); |
108 #else |
116 #else |
109 noerr = aglSetDrawable(glContext, (AGLDrawable)SDL_Window); |
117 noerr = aglSetDrawable(glContext, (AGLDrawable)SDL_Window); |
110 #endif |
118 #endif |
111 |
119 |
112 if(!noerr) { |
120 if(!noerr) { |