|
@@ -115,6 +115,23 @@ static int choosePixelFormatWGL(_GLFWwindow* window,
|
|
if (_glfw.wgl.EXT_colorspace)
|
|
if (_glfw.wgl.EXT_colorspace)
|
|
ADD_ATTRIB(WGL_COLORSPACE_EXT);
|
|
ADD_ATTRIB(WGL_COLORSPACE_EXT);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // NOTE: In a Parallels VM WGL_ARB_pixel_format returns fewer pixel formats than
|
|
|
|
+ // DescribePixelFormat, violating the guarantees of the extension spec
|
|
|
|
+ // HACK: Iterate through the minimum of both counts
|
|
|
|
+
|
|
|
|
+ const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB;
|
|
|
|
+ int extensionCount;
|
|
|
|
+
|
|
|
|
+ if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,
|
|
|
|
+ 1, 0, 1, &attrib, &extensionCount))
|
|
|
|
+ {
|
|
|
|
+ _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
|
|
|
|
+ "WGL: Failed to retrieve pixel format attribute");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ nativeCount = _glfw_min(nativeCount, extensionCount);
|
|
}
|
|
}
|
|
|
|
|
|
usableConfigs = _glfw_calloc(nativeCount, sizeof(_GLFWfbconfig));
|
|
usableConfigs = _glfw_calloc(nativeCount, sizeof(_GLFWfbconfig));
|