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; int flag = 0;
wglgsg->_wglQueryPbufferARB(_pbuffer, WGL_PBUFFER_LOST_ARB, &flag); wglgsg->_wglQueryPbufferARB(_pbuffer, WGL_PBUFFER_LOST_ARB, &flag);
if (flag != 0) { if (flag != 0) {
wgldisplay_cat.info() // The pbuffer was lost, due to a mode change or something
<< "Pbuffer contents lost.\n"; // silly like that. We must therefore recreate the pbuffer.
return false; close_buffer();
if (!open_buffer()) {
return false;
}
} }
} }