Win32: Fix multisample pixel formats
This commit is contained in:
parent
9ecd426e31
commit
074175fa89
|
@ -709,7 +709,6 @@ static bool createARBContextAndPixelFormat(JNIEnv *env, HDC hdc, jobject pixel_f
|
||||||
// rendering context and start over, using the ARB extension instead to pick the context.
|
// rendering context and start over, using the ARB extension instead to pick the context.
|
||||||
if (!extgl_Extensions.WGL_ARB_pixel_format)
|
if (!extgl_Extensions.WGL_ARB_pixel_format)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pixel_format_index = findPixelFormatARB(env, hdc, pixel_format, NULL, true, true, true, true);
|
pixel_format_index = findPixelFormatARB(env, hdc, pixel_format, NULL, true, true, true, true);
|
||||||
if (pixel_format_index == -1) {
|
if (pixel_format_index == -1) {
|
||||||
pixel_format_index = findPixelFormatARB(env, hdc, pixel_format, NULL, true, true, false, true);
|
pixel_format_index = findPixelFormatARB(env, hdc, pixel_format, NULL, true, true, false, true);
|
||||||
|
@ -728,16 +727,19 @@ static bool createARBContextAndPixelFormat(JNIEnv *env, HDC hdc, jobject pixel_f
|
||||||
}
|
}
|
||||||
|
|
||||||
arb_context = wglCreateContext(arb_hdc);
|
arb_context = wglCreateContext(arb_hdc);
|
||||||
|
if (arb_context == NULL) {
|
||||||
closeWindow(&arb_hwnd, &arb_hdc);
|
closeWindow(&arb_hwnd, &arb_hdc);
|
||||||
if ( arb_context == NULL )
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
if (!wglMakeCurrent(arb_hdc, arb_context)) {
|
if (!wglMakeCurrent(arb_hdc, arb_context)) {
|
||||||
wglDeleteContext(arb_context);
|
wglDeleteContext(arb_context);
|
||||||
|
closeWindow(&arb_hwnd, &arb_hdc);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
extgl_InitWGL(env);
|
extgl_InitWGL(env);
|
||||||
|
wglMakeCurrent(NULL, NULL);
|
||||||
|
closeWindow(&arb_hwnd, &arb_hdc);
|
||||||
*pixel_format_index_return = pixel_format_index;
|
*pixel_format_index_return = pixel_format_index;
|
||||||
*context_return = arb_context;
|
*context_return = arb_context;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue