# HG changeset patch # User Sam Lantinga # Date 1184223583 0 # Node ID 5ed37b16c1a75df208a1055b4e912fc271a35c2b # Parent 8b76cc2687712441bd678ea254f8329c9f6a7a34 Yes, you need to set the pixel format before creating a context. diff -r 8b76cc268771 -r 5ed37b16c1a7 src/video/win32/SDL_win32opengl.c --- 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);