Commit Graph

16 Commits

Author SHA1 Message Date
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 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8)
2009-09-27 23:31:35 -07:00
Jeremy Huddleston ae65daab08 XQuartz: Unify how we set our bitmasks for visuals
(cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9)
2009-07-31 15:34:13 -07:00
Jeremy Huddleston da0a274780 XQuartz: Cleanup the bitmask setting for GLX visuals.
(cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b)
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 7351db5c8746be30a4047469ee9b50bc19e62a89)
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 ed181382ddeb77019577d39b9c06b1cd839e18e4)
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 f527381eea6a8ae6cd791475b2060d21fcf8efb2)
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 1e5f63f15e13a40a6e69a1505934d10d6990b6a2)
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 d5c17f585a240be9f9135975738e62951cde3353)
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 98a084ce9c455260ecdb5f8eecb67f33dbb53b69)
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 49b7a7c6f20ca85d4d624444eb83db2f91344591)
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 1056700971fd5c034396ed6dbea15e092f0c6332)
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 190a3d5e5de9915931928fb8e6da88bb9644cda4)
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 fc86f9e4482043eca76d9d7a96e166be1aabf674)
2008-10-08 18:44:21 -07:00