Commit Graph

17 Commits

Author SHA1 Message Date
Nicolas Kaiser
c270cfc30c hw/xquartz: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-24 19:46:07 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.

X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13 00:22:37 +07:00
Jeremy Huddleston
0efd7b8d82 XQuartz GLX: Change around includes for better compatability with different OS versions
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Jeremy Huddleston
4127e8e5be XQuartz: clang static analysis fixes
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15 15:03:49 -08:00
Jeremy Huddleston
67a51cd9ef XQuartz: Fix a bunch of compilation warnings about style
(cherry picked from commit 54000bdcbc)
2009-09-27 23:31:35 -07:00
Jeremy Huddleston
ae65daab08 XQuartz: Unify how we set our bitmasks for visuals
(cherry picked from commit c230b52c27)
2009-07-31 15:34:13 -07:00
Jeremy Huddleston
da0a274780 XQuartz: Cleanup the bitmask setting for GLX visuals.
(cherry picked from commit d32c3df258)
2009-07-31 15:34:03 -07:00
Jeremy Huddleston
c81595e23b XQuartz: Overhaul setting up visuals
The main change is cleanup of the visualConfigs and setting up alpha correctly there to match the visuals being added earlier (so the default visual has a corresponding GLX visual)
(cherry picked from commit 7351db5c87)
2009-07-26 02:35:49 -07:00
George Staplin
47d3821870 XQuartz: GL: Handle the alpha differently when the alpha is equal to GLCAPS_COLOR_BUF_INVALID_VALUE.
This prevents visuals with odd sizes.  The machine I use didn't have
this problem, but it shows up on some others.
(cherry picked from commit ed181382dd)
2008-11-13 11:34:21 -08:00
George Peter Staplin
13d06f5aaf XQuartz: GL: Add capability detection for depth buffers, and multisampling.
GL/capabilities.c: Add handleDepthModes(), and extend
handleRendererDescription() for the various depth and multisampling flags.

Add initialization of the new config options to initConfig().

GL/capabilities.h: Add depth and multisample config members.

GL/visualConfigs.c: Add depth and multisampling support to the visual config
setup.
(cherry picked from commit f527381eea)
2008-11-05 19:23:48 -08:00
George Peter Staplin
34bb06b292 XQuartz: GL: Work around problems with really deep visuals.
GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel,
because they introduce drawing problems.

GL/indirect.c: Comment out some visual setup code that shouldn't be running, and
actually seemed to cause some problems.  The current visualConfigs.c code seems
to do a reasonable job of setting up visuals for XQuartz.

GL/visualConfigs.c: Make use of the proper visual .class.   Eliminate depth 0.
It seems we really just want 24 for now, and 0 I think was a flaw in the original
code.
(cherry picked from commit 1e5f63f15e)
2008-11-05 19:23:41 -08:00
George Peter Staplin
227d782a1b XQuartz: GL: Mark visuals that are slower than others, due to lack of acceleration.
This is used in libGL to determine a preferred visual.  glxinfo -v will also
report "visualCaveat=Slow" for such visuals.
(cherry picked from commit d5c17f585a)
2008-10-31 15:49:25 -07:00
George Peter Staplin
21ea9d82aa XQuartz: GL: Add feature detection of color sizes, and accum sizes.
This gives us a *lot* more visuals, and they should be more accurate.
Some of the visuals may have been wrong before.  This may enable more
OpenGL programs to behave correctly.

I also suspect libGL needs a little work to handle some of these correctly.
(cherry picked from commit 98a084ce9c)
2008-10-28 22:00:29 -07:00
George Peter Staplin
6a2693b2f9 XQuartz: Remove the enable_stereo default. We now use feature detection to enable stereo visuals.
We need to revisit the GL/indirect.c changes.  I think indirect.c should
be using the same feature detection and GLX visual config code.  The
indirect changes will require testing...
(cherry picked from commit 49b7a7c6f2)
2008-10-23 19:22:16 -07:00
George Staplin
8033279294 XQuartz: GL: setVisualConfigs() copied the behavior of indirect.c which is wrong, with regard to the handling of xcalloc failure.
Use ErrorF for an error message after an xcalloc failure, and return instead of falling through to GlxSetVisualConfigs, or abort()ing at the test branch.
(cherry picked from commit 1056700971)
2008-10-08 18:45:09 -07:00
George Staplin
52accec7db XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs().
(cherry picked from commit 190a3d5e5d)
2008-10-08 18:44:28 -07:00
George Staplin
a8f5d422c9 XQuartz: GL: Provide code for getting the capabilities of the underlying system's CGL.
Add a setVisualConfigs that is called before the fbScreenInit, to setup the __GLXvisualConfigs.
(cherry picked from commit fc86f9e448)
2008-10-08 18:44:21 -07:00