comparison src/video/maccommon/SDL_macgl.c @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents c71e05b4dc2e
children d910939febfa
comparison
equal deleted inserted replaced
1360:70a9cfb4cf1b 1361:19418e4422cb
28 28
29 29
30 /* krat: adding OpenGL support */ 30 /* krat: adding OpenGL support */
31 int Mac_GL_Init(_THIS) 31 int Mac_GL_Init(_THIS)
32 { 32 {
33 #ifdef HAVE_OPENGL 33 #if SDL_VIDEO_OPENGL
34 AGLPixelFormat format; 34 AGLPixelFormat format;
35 int i = 0; 35 int i = 0;
36 GLint attributes [ 24 ]; /* 24 is max possible in this setup */ 36 GLint attributes [ 24 ]; /* 24 is max possible in this setup */
37 GLboolean noerr; 37 GLboolean noerr;
38 38
119 #endif 119 #endif
120 } 120 }
121 121
122 void Mac_GL_Quit(_THIS) 122 void Mac_GL_Quit(_THIS)
123 { 123 {
124 #ifdef HAVE_OPENGL 124 #if SDL_VIDEO_OPENGL
125 if ( glContext != NULL ) { 125 if ( glContext != NULL ) {
126 aglSetCurrentContext(NULL); 126 aglSetCurrentContext(NULL);
127 aglSetDrawable(glContext, NULL); 127 aglSetDrawable(glContext, NULL);
128 aglDestroyContext(glContext); 128 aglDestroyContext(glContext);
129 glContext = NULL; 129 glContext = NULL;
130 } 130 }
131 #endif 131 #endif
132 } 132 }
133 133
134 #ifdef HAVE_OPENGL 134 #if SDL_VIDEO_OPENGL
135 135
136 /* Make the current context active */ 136 /* Make the current context active */
137 int Mac_GL_MakeCurrent(_THIS) 137 int Mac_GL_MakeCurrent(_THIS)
138 { 138 {
139 int retval; 139 int retval;
173 void* Mac_GL_GetProcAddress(_THIS, const char *proc) 173 void* Mac_GL_GetProcAddress(_THIS, const char *proc)
174 { 174 {
175 return SDL_LoadFunction( this->hidden->libraryHandle, proc ); 175 return SDL_LoadFunction( this->hidden->libraryHandle, proc );
176 } 176 }
177 177
178 #endif /* HAVE_OPENGL */ 178 #endif /* SDL_VIDEO_OPENGL */
179 179