Commit Graph

19 Commits

Author SHA1 Message Date
Jeremy Huddleston
8620579483 XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard 2009-02-02 12:30:57 -08:00
Jeremy Huddleston
e01662cadc XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT 2009-02-01 15:08:02 -08:00
George Staplin
e2450a4227 XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.
(cherry picked from commit 143224405b)
(cherry picked from commit 92f00abc1f)
2009-02-01 15:05:21 -08:00
George Staplin
eb6f884d4f XQuartz: GL: Add a branch for a NULL DrawablePtr.
This may fix a bug where a NULL structure pointer was accessed resulting in:
KERN_PROTECTION_FAILURE at 0x0000000000000004

I studied the structures in use, and I believe it was the pDraw->id that resulted in
this fault in attach().

The layout of the _Drawable structure is 4 chars, and then the id, so the offset
seems correct for such a bug.

Also make it return an error for now, and ErrorF() to help us figure out where it's
going wrong elsewhere to cause a NULL DrawablePtr.

I also made various formatting changes, because the formatting was inconsistent.
Next time I will probably do the formatting in a separate commit, but hindsight is
20/20.

I will apply a fix to the 1.5 branch after this, in a similar manner.
2008-11-22 10:38:06 -07:00
George Staplin
ed181382dd 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.
2008-11-12 17:17:25 -07:00
George Peter Staplin
f527381eea 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.
2008-11-04 12:53:12 -07:00
George Peter Staplin
1e5f63f15e 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.
2008-11-03 19:59:11 -07:00
Jeremy Huddleston
ea71710aaa XQuartz: LP64 related casting fixes from Bob Murphy 2008-10-31 18:58:57 -07:00
George Peter Staplin
d5c17f585a 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.
2008-10-30 13:56:09 -06:00
George Peter Staplin
fe35a36390 XQuartz: GL: Fix several error handling mistakes in handleRenderDescriptions, that were leftover before the final code evolved. 2008-10-24 19:12:05 -06:00
George Peter Staplin
98a084ce9c 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.
2008-10-24 18:18:58 -06:00
George Peter Staplin
508ebb7c45 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...

Same as the 1.5 branch changes.
2008-10-23 17:53:13 -06:00
Jeremy Huddleston
a11c905203 XQuartz: Fixed EXTRA_DIST for new GL files. 2008-10-07 11:39:08 -07:00
George Staplin
1056700971 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.
2008-10-07 12:12:38 -06:00
George Staplin
190a3d5e5d XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs(). 2008-10-07 11:31:48 -06:00
George Staplin
eb3c014e17 XQuartz: GL: Add the new C code to the Makefile.am.
Commit the darwin.c changes I missed in the last commit, for calling
setVisualConfigs().
2008-10-06 18:05:12 -06:00
George Staplin
fc86f9e448 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.
2008-10-06 18:01:23 -06:00
Jeremy Huddleston
3a6898f487 XQuartz: GLX - enable_stereo defaults option should work now 2008-10-04 15:07:29 -07:00
Jeremy Huddleston
21fc95930f Moved Apple GL bits into our DDX subtree 2008-04-23 10:35:59 -07:00