Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_win32opengl.c @ 3105:cdeee9f9b14b
Fixed bug #721
From michalziulek@gmail.com 2009-03-28 07:43:34 (-) [reply]
There is a bug in OpenGL 3.x context creation code.
Function glXGetProcAddress is used directly where it should be:
_this->gl_data->glXGetProcAddress. I have attached patch which fixes this on
x11 and win32. Thanks.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 03 Apr 2009 17:19:05 +0000 |
parents | 7dc982143c06 |
children | 7f684f249ec9 |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32opengl.c Fri Apr 03 13:35:05 2009 +0000 +++ b/src/video/win32/SDL_win32opengl.c Fri Apr 03 17:19:05 2009 +0000 @@ -512,7 +512,7 @@ return NULL; } - wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress("wglCreateContextAttribsARB"); + wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) _this->gl_data->wglGetProcAddress("wglCreateContextAttribsARB"); if (!wglCreateContextAttribsARB) { SDL_SetError("GL 3.x is not supported"); context = temp_context; @@ -525,7 +525,7 @@ /* Create the GL 3.x context */ context = wglCreateContextAttribsARB(hdc, 0, attribs); /* Delete the GL 2.x context */ - wglDeleteContext(temp_context); + _this->gl_data->wglDeleteContext(temp_context); } }