mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
recreate pbuffer if it is lost
This commit is contained in:
parent
36dc54b6c6
commit
b49f3d4b51
@ -75,9 +75,12 @@ begin_frame() {
|
||||
int flag = 0;
|
||||
wglgsg->_wglQueryPbufferARB(_pbuffer, WGL_PBUFFER_LOST_ARB, &flag);
|
||||
if (flag != 0) {
|
||||
wgldisplay_cat.info()
|
||||
<< "Pbuffer contents lost.\n";
|
||||
return false;
|
||||
// The pbuffer was lost, due to a mode change or something
|
||||
// silly like that. We must therefore recreate the pbuffer.
|
||||
close_buffer();
|
||||
if (!open_buffer()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user