Win32 part of Display/Window merge

This commit is contained in:
Elias Naur 2004-07-03 11:29:44 +00:00
parent 86ddd2a579
commit fa45b4dc78
1 changed files with 2 additions and 2 deletions

View File

@ -683,12 +683,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_createContext(JNIEnv *env,
extgl_Close();
return;
}
wglMakeCurrent(hdc, hglrc);
// Some crazy strangeness here so we can use ARB_pixel_format to specify the number
// of multisamples we want. If the extension is present we'll delete the existing
// rendering context and start over, using the ARB extension instead to pick the context.
extgl_InitWGL(env);
if (extgl_Extensions.WGL_ARB_pixel_format) {
wglMakeCurrent(hdc, hglrc);
extgl_InitWGL(env);
pixel_format_index = findPixelFormatARB(env, pixel_format, NULL, true, true, true);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc);