Bug 935 - glxgears does not work on Darwin
Summary: glxgears does not work on Darwin
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: App/other (show other bugs)
Version: git
Hardware: PowerPC All
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-27 23:47 UTC by Roland Mainz
Modified: 2005-07-30 23:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Roland Mainz 2004-07-27 23:47:59 UTC
2004-07-27-trunk, an attempt to use glxgears on Darwin fails with the message:
-- snip --
glxgears: Error: couldn't get an RGB, Double-buffered visual.
-- snip --

The following quick hack works around the problem:
-- snip --
Index: xc/programs/glxgears/glxgears.c
===================================================================
RCS file: /cvs/xorg/xc/programs/glxgears/glxgears.c,v
retrieving revision 1.3
diff -u -r1.3 glxgears.c
--- xc/programs/glxgears/glxgears.c     29 Apr 2004 23:00:06 -0000      1.3
+++ xc/programs/glxgears/glxgears.c     28 Jul 2004 06:11:00 -0000
@@ -342,11 +342,9 @@
              int x, int y, int width, int height,
              Window *winRet, GLXContext *ctxRet)
 {
-   int attrib[] = { GLX_RGBA,
-                   GLX_RED_SIZE, 1,
+   int attrib[] = { GLX_RED_SIZE, 1,
                    GLX_GREEN_SIZE, 1,
                    GLX_BLUE_SIZE, 1,
-                   GLX_DOUBLEBUFFER,
                    GLX_DEPTH_SIZE, 1,
                    None };
    int scrnum;
-- snip --
IMO "glxgears" should have an option to test for non-doublebuffer/non-RGBA
visuals, too.
Comment 1 Adam Jackson 2004-07-28 09:03:05 UTC
can you paste the visual info table from glxinfo?
Comment 2 Torrey T. Lyons 2004-07-28 10:42:11 UTC
What version of Mac OS X are you using? glxgears does work for me using the top of the tree XDarwin 
on Mac OS X 10.3.4. If you are running XDarwin, what display mode and GLX bundle is reported as 
being used. There will be two lines in the startup messages like:

Loading GLX bundle glxCGL.bundle (using Apple's OpenGL)
Display mode: Rootless Quartz -- Xplugin implementation

For reference, with this configuration the visual table from glxinfo is:

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 24 tc  1 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x24 24 tc  1 24  0 r  .  .  8  8  8  0  0  0  0 16 16 16 16  0 0 None
0x25 24 tc  1 24  0 r  .  .  8  8  8  0  0  0  8  0  0  0  0  0 0 None
0x26 24 tc  1 24  0 r  .  .  8  8  8  0  0  0  8 16 16 16 16  0 0 None
0x27 24 tc  1 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x28 24 tc  1 24  0 r  y  .  8  8  8  0  0  0  0 16 16 16 16  0 0 None
0x29 24 tc  1 24  0 r  y  .  8  8  8  0  0  0  8  0  0  0  0  0 0 None
0x2a 24 tc  1 24  0 r  y  .  8  8  8  0  0  0  8 16 16 16 16  0 0 None
0x2b 24 tc  1 24  0 r  .  .  8  8  8  0  2  0  0  0  0  0  0  0 0 None
0x2c 24 tc  1 24  0 r  .  .  8  8  8  0  2  0  0 16 16 16 16  0 0 None
0x2d 24 tc  1 24  0 r  .  .  8  8  8  0  2  0  8  0  0  0  0  0 0 None
0x2e 24 tc  1 24  0 r  .  .  8  8  8  0  2  0  8 16 16 16 16  0 0 None
0x2f 24 tc  1 24  0 r  y  .  8  8  8  0  2  0  0  0  0  0  0  0 0 None
0x30 24 tc  1 24  0 r  y  .  8  8  8  0  2  0  0 16 16 16 16  0 0 None
0x31 24 tc  1 24  0 r  y  .  8  8  8  0  2  0  8  0  0  0  0  0 0 None
0x32 24 tc  1 24  0 r  y  .  8  8  8  0  2  0  8 16 16 16 16  0 0 None
0x33 24 tc  1 24  0 r  .  .  8  8  8  0  0 24  0  0  0  0  0  0 0 None
0x34 24 tc  1 24  0 r  .  .  8  8  8  0  0 24  0 16 16 16 16  0 0 None
0x35 24 tc  1 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x36 24 tc  1 24  0 r  .  .  8  8  8  0  0 24  8 16 16 16 16  0 0 None
0x37 24 tc  1 24  0 r  y  .  8  8  8  0  0 24  0  0  0  0  0  0 0 None
0x38 24 tc  1 24  0 r  y  .  8  8  8  0  0 24  0 16 16 16 16  0 0 None
0x39 24 tc  1 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x3a 24 tc  1 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16 16  0 0 None
0x3b 24 tc  1 24  0 r  .  .  8  8  8  0  2 24  0  0  0  0  0  0 0 None
0x3c 24 tc  1 24  0 r  .  .  8  8  8  0  2 24  0 16 16 16 16  0 0 None
0x3d 24 tc  1 24  0 r  .  .  8  8  8  0  2 24  8  0  0  0  0  0 0 None
0x3e 24 tc  1 24  0 r  .  .  8  8  8  0  2 24  8 16 16 16 16  0 0 None
0x3f 24 tc  1 24  0 r  y  .  8  8  8  0  2 24  0  0  0  0  0  0 0 None
0x40 24 tc  1 24  0 r  y  .  8  8  8  0  2 24  0 16 16 16 16  0 0 None
0x41 24 tc  1 24  0 r  y  .  8  8  8  0  2 24  8  0  0  0  0  0 0 None
0x42 24 tc  1 24  0 r  y  .  8  8  8  0  2 24  8 16 16 16 16  0 0 None
Comment 3 Adam Jackson 2005-08-01 09:39:11 UTC
works in my testing, please reopen if this is still an issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.