mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
wgldisplay: Fix HDR framebuffers with newer NVIDIA drivers
[skip ci]
This commit is contained in:
parent
7c3e660b15
commit
0a7afb37d9
@ -336,6 +336,8 @@ choose_pixel_format(const FrameBufferProperties &properties,
|
|||||||
_supports_pixel_format = has_extension("WGL_ARB_pixel_format");
|
_supports_pixel_format = has_extension("WGL_ARB_pixel_format");
|
||||||
_supports_wgl_multisample = has_extension("WGL_ARB_multisample");
|
_supports_wgl_multisample = has_extension("WGL_ARB_multisample");
|
||||||
|
|
||||||
|
bool supports_pixel_format_float = _supports_pixel_format && has_extension("WGL_ARB_pixel_format_float");
|
||||||
|
|
||||||
if (has_extension("WGL_ARB_create_context")) {
|
if (has_extension("WGL_ARB_create_context")) {
|
||||||
_wglCreateContextAttribsARB =
|
_wglCreateContextAttribsARB =
|
||||||
(PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
|
(PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
|
||||||
@ -381,6 +383,10 @@ choose_pixel_format(const FrameBufferProperties &properties,
|
|||||||
iattrib_list[ni++] = WGL_PIXEL_TYPE_ARB;
|
iattrib_list[ni++] = WGL_PIXEL_TYPE_ARB;
|
||||||
iattrib_list[ni++] = WGL_TYPE_RGBA_ARB;
|
iattrib_list[ni++] = WGL_TYPE_RGBA_ARB;
|
||||||
}
|
}
|
||||||
|
else if (supports_pixel_format_float) {
|
||||||
|
iattrib_list[ni++] = WGL_PIXEL_TYPE_ARB;
|
||||||
|
iattrib_list[ni++] = WGL_TYPE_RGBA_FLOAT_ARB;
|
||||||
|
}
|
||||||
|
|
||||||
if (need_pbuffer) {
|
if (need_pbuffer) {
|
||||||
iattrib_list[ni++] = WGL_DRAW_TO_PBUFFER_ARB;
|
iattrib_list[ni++] = WGL_DRAW_TO_PBUFFER_ARB;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user