summaryrefslogtreecommitdiffstats
path: root/progs/xdemos/glxinfo.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-12-07 17:16:10 -0800
committerIan Romanick <[email protected]>2009-12-07 17:16:10 -0800
commit8fc433fa0f8c5364454858f9be919387feda440c (patch)
treeec4fd82af464123acbef1f16212aa44e8f9fddd1 /progs/xdemos/glxinfo.c
parentbb64c9bcdf9962c4f74d71f49307de1da4c3392b (diff)
parent9dbd47fc6b1cf9ddfb318f2e05df0886cd5fe0df (diff)
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts: progs/demos/projtex.c progs/xdemos/glxinfo.c src/mesa/main/version.h To fix the confilicts in projtex.c and glxinfo.c I just took the code from mesa_7_6_branch. The conflicts seem to have occured from cherry-picks from mesa_7_7_branch to mesa_7_6_branch followed by commmits just to mesa_7_6_branch.
Diffstat (limited to 'progs/xdemos/glxinfo.c')
-rw-r--r--progs/xdemos/glxinfo.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index b182a3091d1..23df82f6f90 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -401,6 +401,10 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
root = RootWindow(dpy, scrnum);
+ /*
+ * Find a basic GLX visual. We'll then create a rendering context and
+ * query various info strings.
+ */
visinfo = glXChooseVisual(dpy, scrnum, attribSingle);
if (!visinfo)
visinfo = glXChooseVisual(dpy, scrnum, attribDouble);
@@ -409,24 +413,29 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
#ifdef GLX_VERSION_1_3
- {
+ /* Try glXChooseFBConfig() if glXChooseVisual didn't work.
+ * XXX when would that happen?
+ */
+ if (!visinfo) {
int fbAttribSingle[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
- GLX_DOUBLEBUFFER, GL_TRUE,
+ GLX_DOUBLEBUFFER, GL_FALSE,
None };
int fbAttribDouble[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
+ GLX_DOUBLEBUFFER, GL_TRUE,
None };
GLXFBConfig *configs = NULL;
int nConfigs;
- if (!visinfo)
+ configs = glXChooseFBConfig(dpy, scrnum, fbAttribSingle, &nConfigs);
+ if (!configs)
configs = glXChooseFBConfig(dpy, scrnum, fbAttribDouble, &nConfigs);
if (configs) {