mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fix pbuffer crash on Windows with old Intel drivers
This commit is contained in:
parent
2f0bc01b68
commit
320f341467
@ -74,10 +74,12 @@ begin_frame(FrameMode mode, Thread *current_thread) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_fb_properties.is_single_buffered()) {
|
if (_pbuffer_bound) {
|
||||||
wglgsg->_wglReleaseTexImageARB(_pbuffer, WGL_FRONT_LEFT_ARB);
|
if (_fb_properties.is_single_buffered()) {
|
||||||
} else {
|
wglgsg->_wglReleaseTexImageARB(_pbuffer, WGL_FRONT_LEFT_ARB);
|
||||||
wglgsg->_wglReleaseTexImageARB(_pbuffer, WGL_BACK_LEFT_ARB);
|
} else {
|
||||||
|
wglgsg->_wglReleaseTexImageARB(_pbuffer, WGL_BACK_LEFT_ARB);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rebuild_bitplanes()) {
|
if (!rebuild_bitplanes()) {
|
||||||
@ -146,7 +148,7 @@ bind_texture_to_pbuffer() {
|
|||||||
for (size_t i = 0; i != cdata->_textures.size(); ++i) {
|
for (size_t i = 0; i != cdata->_textures.size(); ++i) {
|
||||||
const RenderTexture &rt = cdata->_textures[i];
|
const RenderTexture &rt = cdata->_textures[i];
|
||||||
RenderTexturePlane plane = rt._plane;
|
RenderTexturePlane plane = rt._plane;
|
||||||
if (plane == RTP_color) {
|
if (plane == RTP_color && rt._rtm_mode == RTM_bind_or_copy) {
|
||||||
tex_index = i;
|
tex_index = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user