Mercurial > sdl-ios-xcode
changeset 2180:5ed37b16c1a7
Yes, you need to set the pixel format before creating a context.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 12 Jul 2007 06:59:43 +0000 |
parents | 8b76cc268771 |
children | 791cdc226105 |
files | src/video/win32/SDL_win32opengl.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32opengl.c Thu Jul 12 06:53:20 2007 +0000 +++ b/src/video/win32/SDL_win32opengl.c Thu Jul 12 06:59:43 2007 +0000 @@ -340,6 +340,7 @@ { HWND hwnd; HDC hdc; + PIXELFORMATDESCRIPTOR pfd; HGLRC hglrc; int pixel_format = 0; unsigned int matching; @@ -351,6 +352,10 @@ hdc = GetDC(hwnd); + WIN_GL_SetupPixelFormat(_this, &pfd); + + SetPixelFormat(hdc, ChoosePixelFormat(hdc, &pfd), &pfd); + hglrc = _this->gl_data->wglCreateContext(hdc); if (hglrc) { _this->gl_data->wglMakeCurrent(hdc, hglrc);