recreate pbuffer if it is lost

This commit is contained in:
David Rose 2004-02-19 21:53:38 +00:00
parent 36dc54b6c6
commit b49f3d4b51

View File

@ -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;
}
}
}