From db5e5c6c5d88c3b3fc41c98f8c17178ed3faf5ae Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 15 Apr 2011 07:09:00 +0000 Subject: [PATCH] fallback to XVisual interface if there are no FBConfig contexts (untested) --- .../src/glxdisplay/glxGraphicsStateGuardian.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/panda/src/glxdisplay/glxGraphicsStateGuardian.cxx b/panda/src/glxdisplay/glxGraphicsStateGuardian.cxx index 8a86113d40..4c76e0c9b3 100644 --- a/panda/src/glxdisplay/glxGraphicsStateGuardian.cxx +++ b/panda/src/glxdisplay/glxGraphicsStateGuardian.cxx @@ -375,8 +375,20 @@ choose_pixel_format(const FrameBufferProperties &properties, _visuals = 0; } - glxdisplay_cat.info() - << "No suitable FBConfig contexts available.\n"; + glxdisplay_cat.warning() + << "No suitable FBConfig contexts available; using XVisual only.\n" + << _fbprops << "\n"; + + _context = _temp_context; + _temp_context = (GLXContext)NULL; + + // By convention, every indirect XVisual that can render to a + // window can also render to a GLXPixmap. Direct visuals we're + // not as sure about. + _context_has_pixmap = !glXIsDirect(_display, _context); + + // Pbuffers aren't supported at all with the XVisual interface. + _context_has_pbuffer = false; } ////////////////////////////////////////////////////////////////////