Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_wingl.c @ 1659:14717b52abc0 SDL-1.3
Merge trunk-1.3-3
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 17 May 2006 08:18:28 +0000 |
parents | 96c2f89cc7e1 |
children | 782fd950bd46 |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_wingl.c Mon May 01 06:58:33 2006 +0000 +++ b/src/video/wincommon/SDL_wingl.c Wed May 17 08:18:28 2006 +0000 @@ -177,6 +177,7 @@ int iAttribs[64]; int *iAttr; float fAttribs[1] = { 0 }; + const GLubyte *(WINAPI *glGetStringFunc)(GLenum); const char *wglext; /* load the gl driver from a default path */ @@ -338,8 +339,14 @@ * somewhat a documented and reliable hack - it was originally * as a feature added by mistake, but since so many people rely * on it, it will not be removed. strstr should be safe here.*/ - wglext = (const char *)this->glGetString(GL_EXTENSIONS); - if ( !SDL_strstr(wglext, "WGL_EXT_swap_control") ) { + glGetStringFunc = WIN_GL_GetProcAddress(this, "glGetString"); + if ( glGetStringFunc ) { + wglext = (const char *)glGetStringFunc(GL_EXTENSIONS); + } else { + /* Uh oh, something is seriously wrong here... */ + wglext = NULL; + } + if ( !wglext || !SDL_strstr(wglext, "WGL_EXT_swap_control") ) { this->gl_data->wglSwapIntervalEXT = NULL; this->gl_data->wglGetSwapIntervalEXT = NULL; }