projects
/
gltest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a1fa34
)
test for invalid FBConfigs; explicitly request an FBConfig suited for a WINDOW
author
Ralf Jung
<post@ralfj.de>
Fri, 21 Feb 2014 12:02:57 +0000
(13:02 +0100)
committer
Ralf Jung
<post@ralfj.de>
Fri, 21 Feb 2014 12:02:57 +0000
(13:02 +0100)
glxbackend.cpp
patch
|
blob
|
history
diff --git
a/glxbackend.cpp
b/glxbackend.cpp
index d636f677fc29b75e11236a436bf998344510163b..a5c9e0c84911384d693c98d4a8c9680da0dec6ad 100644
(file)
--- a/
glxbackend.cpp
+++ b/
glxbackend.cpp
@@
-32,6
+32,7
@@
static int configAttribs[] =
{
GLX_RENDER_TYPE, GLX_RGBA_BIT,
+ GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4,
@@
-77,6
+78,9
@@
VisualID GLXBackend::initialize(Display *display)
}
// return visual ID
XVisualInfo *vi = glXGetVisualFromFBConfig(display, config);
+ if (vi== NULL) {
+ die("The GLXFBConfig I got is invalid\n");
+ }
VisualID visualid = vi->visualid;
XFree(vi);
return visualid;