correctly test for fbconfig before trying to create a buffer
This commit is contained in:
parent
3d2f33e10e
commit
c5d3a6f7d8
|
|
@ -125,6 +125,12 @@ open_buffer() {
|
|||
glxGraphicsStateGuardian *glxgsg;
|
||||
DCAST_INTO_R(glxgsg, _gsg, false);
|
||||
|
||||
if (glxgsg->_fbconfig == None) {
|
||||
// If we didn't use an fbconfig to create the GSG, we can't create
|
||||
// a PBuffer.
|
||||
return false;
|
||||
}
|
||||
|
||||
static const int max_attrib_list = 32;
|
||||
int attrib_list[max_attrib_list];
|
||||
int n=0;
|
||||
|
|
|
|||
|
|
@ -398,7 +398,9 @@ choose_fbconfig(FrameBufferProperties &properties) const {
|
|||
}
|
||||
|
||||
if (fbconfig == None) {
|
||||
glxdisplay_cat.error()
|
||||
// This is only an info message, because we can still fall
|
||||
// back to the XVisual interface.
|
||||
glxdisplay_cat.info()
|
||||
<< "Could not get any GLX fbconfig.\n";
|
||||
return None;
|
||||
}
|
||||
|
|
@ -571,7 +573,7 @@ try_for_fbconfig(int framebuffer_mode,
|
|||
attrib_list[n] = (int)None;
|
||||
|
||||
int num_configs = 0;
|
||||
GLXFBConfig *configs =
|
||||
GLXFBConfig *configs =
|
||||
glXChooseFBConfig(_display, _screen, attrib_list, &num_configs);
|
||||
|
||||
if (glxdisplay_cat.is_debug()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue