[Xquartz-changes] [396] AppleSGLX/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 25 09:56:41 PST 2009


Revision: 396
          http://trac.macosforge.org/projects/xquartz/changeset/396
Author:   jeremyhu at freedesktop.org
Date:     2009-12-25 09:56:38 -0800 (Fri, 25 Dec 2009)
Log Message:
-----------
Use GLX_USE_APPLEGL rather than __APPLE__

Modified Paths:
--------------
    AppleSGLX/trunk/Makefile
    AppleSGLX/trunk/compsize.c
    AppleSGLX/trunk/glcontextmodes.c
    AppleSGLX/trunk/glx_pbuffer.c
    AppleSGLX/trunk/glxclient.h
    AppleSGLX/trunk/glxcmds.c
    AppleSGLX/trunk/glxcurrent.c
    AppleSGLX/trunk/glxext.c
    AppleSGLX/trunk/glxextensions.c
    AppleSGLX/trunk/xfont.c

Modified: AppleSGLX/trunk/Makefile
===================================================================
--- AppleSGLX/trunk/Makefile	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/Makefile	2009-12-25 17:56:38 UTC (rev 396)
@@ -2,7 +2,7 @@
 X11_DIR = $(INSTALL_DIR)
 
 CC=gcc
-GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
+GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS)
 GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
 
 TCLSH=tclsh8.5
@@ -12,7 +12,7 @@
 LN=ln
 RM=rm
 
-INCLUDE=-I. -Iinclude -Iinclude/internal -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
+INCLUDE=-I. -Iinclude -Iinclude/internal -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
 COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
 
 #The directory with the final binaries.

Modified: AppleSGLX/trunk/compsize.c
===================================================================
--- AppleSGLX/trunk/compsize.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/compsize.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -29,7 +29,7 @@
  */
 
 #include <GL/gl.h>
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #include "indirect_size.h"
 #endif
 #include "glxclient.h"

Modified: AppleSGLX/trunk/glcontextmodes.c
===================================================================
--- AppleSGLX/trunk/glcontextmodes.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glcontextmodes.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -266,7 +266,7 @@
    case GLX_LEVEL:
       *value_return = mode->level;
       return 0;
-#ifndef __APPLE__               /* This isn't supported by CGL. */
+#ifndef GLX_USE_APPLEGL               /* This isn't supported by CGL. */
    case GLX_TRANSPARENT_TYPE_EXT:
       *value_return = mode->transparentPixel;
       return 0;
@@ -316,7 +316,7 @@
    case GLX_MAX_PBUFFER_PIXELS:
       *value_return = mode->maxPbufferPixels;
       return 0;
-#ifndef __APPLE__               /* These aren't supported by CGL. */
+#ifndef GLX_USE_APPLEGL               /* These aren't supported by CGL. */
    case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX:
       *value_return = mode->optimalPbufferWidth;
       return 0;

Modified: AppleSGLX/trunk/glx_pbuffer.c
===================================================================
--- AppleSGLX/trunk/glx_pbuffer.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glx_pbuffer.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -35,7 +35,7 @@
 #include <X11/extensions/Xext.h>
 #include <assert.h>
 #include <string.h>
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 #include <pthread.h>
 #include "apple_glx_drawable.h"
 #include "glx_error.h"
@@ -69,7 +69,7 @@
    }
 }
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /**
  * Change a drawable's attribute.
  *
@@ -576,7 +576,7 @@
                                          attrib_list, GL_FALSE);
 }
 
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
 /**
  * Create a new pbuffer.
@@ -585,7 +585,7 @@
 glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
 {
    int i, width, height;
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    GLXPbuffer result;
    int errorcode;
 #endif
@@ -595,7 +595,7 @@
 
    WARN_ONCE_GLX_1_3(dpy, __func__);
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    for (i = 0; attrib_list[i]; ++i) {
       switch (attrib_list[i]) {
       case GLX_PBUFFER_WIDTH:
@@ -659,7 +659,7 @@
 PUBLIC void
 glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if (apple_glx_pbuffer_destroy(dpy, pbuf)) {
       __glXSendError(dpy, GLXBadPbuffer, pbuf, X_GLXDestroyPbuffer, false);
    }
@@ -677,7 +677,7 @@
                  int attribute, unsigned int *value)
 {
    WARN_ONCE_GLX_1_3(dpy, __func__);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    Window root;
    int x, y;
    unsigned int width, height, bd, depth;
@@ -717,7 +717,7 @@
 }
 
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /**
  * Query an attribute of a pbuffer.
  */
@@ -735,7 +735,7 @@
 PUBLIC void
 glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    XWindowAttributes xwattr;
 
    if (apple_glx_pbuffer_set_event_mask(drawable, mask))
@@ -768,7 +768,7 @@
 PUBLIC void
 glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    XWindowAttributes xwattr;
 
    if (apple_glx_pbuffer_get_event_mask(drawable, mask))
@@ -808,7 +808,7 @@
 {
    WARN_ONCE_GLX_1_3(dpy, __func__);
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    const __GLcontextModes *modes = (const __GLcontextModes *) config;
 
    if (apple_glx_pixmap_create(dpy, modes->screen, pixmap, modes))
@@ -827,7 +827,7 @@
                 const int *attrib_list)
 {
    WARN_ONCE_GLX_1_3(dpy, __func__);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    XWindowAttributes xwattr;
    XVisualInfo *visinfo;
 
@@ -861,7 +861,7 @@
 glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
 {
    WARN_ONCE_GLX_1_3(dpy, __func__);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if (apple_glx_pixmap_destroy(dpy, pixmap))
       __glXSendError(dpy, GLXBadPixmap, pixmap, X_GLXDestroyPixmap, false);
 #else
@@ -874,12 +874,12 @@
 glXDestroyWindow(Display * dpy, GLXWindow win)
 {
    WARN_ONCE_GLX_1_3(dpy, __func__);
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    DestroyDrawable(dpy, (GLXDrawable) win, X_GLXDestroyWindow);
 #endif
 }
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 PUBLIC
 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
                (Display * dpy, GLXPbufferSGIX pbuf),

Modified: AppleSGLX/trunk/glxclient.h
===================================================================
--- AppleSGLX/trunk/glxclient.h	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glxclient.h	2009-12-25 17:56:38 UTC (rev 396)
@@ -53,7 +53,7 @@
 #include "GL/glxint.h"
 #include "GL/glxproto.h"
 #include "GL/internal/glcore.h"
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #include "glapi/glapitable.h"
 #endif
 #include "glxhash.h"
@@ -187,7 +187,7 @@
 
 #endif
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 extern void DRI_glXUseXFont( Font font, int first, int count, int listbase );
 #endif
 
@@ -444,7 +444,7 @@
 
    char gl_extension_bits[__GL_EXT_BYTES];
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    void *apple;
    Bool do_destroy;
 #endif
@@ -626,7 +626,7 @@
 
 extern GLubyte *__glXFlushRenderBuffer(__GLXcontext *, GLubyte *);
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 extern void __glXSendLargeChunk(__GLXcontext * gc, GLint requestNumber,
                                 GLint totalRequests,
                                 const GLvoid * data, GLint dataLen);

Modified: AppleSGLX/trunk/glxcmds.c
===================================================================
--- AppleSGLX/trunk/glxcmds.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glxcmds.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -34,7 +34,7 @@
  */
 
 #include "glxclient.h"
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 #include "apple_glx_context.h"
 #include "apple_glx.h"
 #include "glx_error.h"
@@ -44,7 +44,7 @@
 #include "glxextensions.h"
 #include "glcontextmodes.h"
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #ifdef GLX_DIRECT_RENDERING
 #include <sys/time.h>
 #include <X11/extensions/xf86vmode.h>
@@ -352,7 +352,7 @@
    }
    gc->maxSmallRenderCommandSize = bufSize;
    
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    gc->apple = NULL;
    gc->do_destroy = False;   
 #endif
@@ -378,11 +378,11 @@
               Bool use_glx_1_3, int renderType)
 {
    GLXContext gc;
-#if defined(GLX_DIRECT_RENDERING) || defined(__APPLE__)
+#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL)
    int screen = (fbconfig == NULL) ? vis->screen : fbconfig->screen;
    __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
 #endif
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    const __GLcontextModes *mode;
    int errorcode;
    bool x11error;
@@ -399,7 +399,7 @@
       if ((vis == NULL) && (fbconfig == NULL))
          return NULL;
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #ifdef GLX_DIRECT_RENDERING
       if (allowDirect && psc->driScreen) {
          const __GLcontextModes *mode;
@@ -509,7 +509,7 @@
 #endif
    }
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    gc->xid = contextID;
    gc->imported = GL_FALSE;
 
@@ -563,7 +563,7 @@
       XFree((char *) gc->version);
    if (gc->extensions)
       XFree((char *) gc->extensions);
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    __glFreeAttributeState(gc);
 #endif
    XFree((char *) gc->buf);
@@ -578,7 +578,7 @@
 static void
 DestroyContext(Display * dpy, GLXContext gc)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    xGLXDestroyContextReq *req;
    GLXContextID xid;
    CARD8 opcode;
@@ -616,10 +616,10 @@
    __glXFreeVertexArrayState(gc);
 #else
    __glXLock();
-#endif /* __APPLE__ */   
+#endif /* GLX_USE_APPLEGL */   
 
    if (gc->currentDpy) {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
       /* 
        * Set the Bool that indicates that we should destroy this GLX context
        * when the context is no longer current.
@@ -632,13 +632,13 @@
    else {
       /* Destroy the handle if not current to anybody */
       __glXUnlock();
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
       if(gc->apple)
          apple_glx_destroy_context(&gc->apple, dpy);
 #endif
       __glXFreeContext(gc);
    }
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    if (!imported) {
       /*
        ** This dpy also created the server side part of the context.
@@ -707,7 +707,7 @@
 PUBLIC void
 glXWaitGL(void)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    xGLXWaitGLReq *req;
 #endif
    GLXContext gc = __glXGetCurrentContext();
@@ -718,7 +718,7 @@
 
    /* Flush any pending commands out */
    __glXFlushRenderBuffer(gc, gc->pc);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    glFinish();
 #else
 #ifdef GLX_DIRECT_RENDERING
@@ -745,7 +745,7 @@
    req->contextTag = gc->currentContextTag;
    UnlockDisplay(dpy);
    SyncHandle();
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 /*
@@ -755,7 +755,7 @@
 PUBLIC void
 glXWaitX(void)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    xGLXWaitXReq *req;
 #endif
    GLXContext gc = __glXGetCurrentContext();
@@ -767,7 +767,7 @@
    /* Flush any pending commands out */
    __glXFlushRenderBuffer(gc, gc->pc);
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    apple_glx_waitx(dpy, gc->apple);
 #else
 #ifdef GLX_DIRECT_RENDERING
@@ -797,13 +797,13 @@
    req->contextTag = gc->currentContextTag;
    UnlockDisplay(dpy);
    SyncHandle();
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 PUBLIC void
 glXUseXFont(Font font, int first, int count, int listBase)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    xGLXUseXFontReq *req;
 #endif
    GLXContext gc = __glXGetCurrentContext();
@@ -814,7 +814,7 @@
 
    /* Flush any pending commands out */
    (void) __glXFlushRenderBuffer(gc, gc->pc);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    DRI_glXUseXFont(font, first, count, listBase); 
 #else
 #ifdef GLX_DIRECT_RENDERING
@@ -836,7 +836,7 @@
    req->listBase = listBase;
    UnlockDisplay(dpy);
    SyncHandle();
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 /************************************************************************/
@@ -849,7 +849,7 @@
 glXCopyContext(Display * dpy, GLXContext source,
                GLXContext dest, unsigned long mask)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    GLXContext gc = __glXGetCurrentContext();
    int errorcode;
    bool x11error;
@@ -898,11 +898,11 @@
    req->contextTag = tag;
    UnlockDisplay(dpy);
    SyncHandle();
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /**
  * Determine if a context uses direct rendering.
  *
@@ -950,7 +950,7 @@
    return reply.isDirect;
 #endif /* USE_XCB */
 }
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
 /**
  * \todo
@@ -961,7 +961,7 @@
 PUBLIC Bool
 glXIsDirect(Display * dpy, GLXContext gc)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    /*
     * This isn't an ideal test.  
     * glXIsDirect should probably search a list of contexts.
@@ -981,13 +981,13 @@
 #endif
    }
    return __glXIsDirect(dpy, gc->xid);
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 PUBLIC GLXPixmap
 glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    int screen = vis->screen;
    __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
    const __GLcontextModes *modes;
@@ -1057,7 +1057,7 @@
 PUBLIC void
 glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if(apple_glx_pixmap_destroy(dpy, glxpixmap))
       __glXSendError(dpy, GLXBadPixmap, glxpixmap, X_GLXDestroyPixmap, false);
 #else
@@ -1091,13 +1091,13 @@
       }
    }
 #endif
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 PUBLIC void
 glXSwapBuffers(Display * dpy, GLXDrawable drawable)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    GLXContext gc = glXGetCurrentContext();
    if(gc && apple_glx_is_current_drawable(dpy, gc->apple, drawable)) {
       apple_glx_swap_buffers(gc->apple);
@@ -1159,7 +1159,7 @@
    SyncHandle();
    XFlush(dpy);
 #endif /* USE_XCB */
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 }
 
 
@@ -1584,7 +1584,7 @@
       }
    }
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if(visualList && getenv("LIBGL_DUMP_VISUALID")) {
       printf("visualid 0x%lx\n", visualList[0].visualid);
    }
@@ -1721,7 +1721,7 @@
 GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
           glXGetCurrentDisplay)
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /**
  * Used internally by libGL to send \c xGLXQueryContextinfoExtReq requests
  * to the X-server.
@@ -1837,7 +1837,7 @@
 PUBLIC int
 glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    int retVal;
 
    /* get the information from the server if we don't have it already */
@@ -1853,7 +1853,7 @@
 #endif
 
    switch (attribute) {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
       case GLX_SHARE_CONTEXT_EXT:
       *value = (int) (ctx->share_xid);
       break;
@@ -1889,7 +1889,7 @@
 PUBLIC GLXContext
 glXImportContextEXT(Display * dpy, GLXContextID contextID)
 {
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    return NULL;
 #else
    GLXContext ctx;
@@ -2031,7 +2031,7 @@
    return XGetVisualInfo(dpy, VisualIDMask, &visualTemplate, &count);
 }
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /*
 ** GLX_SGI_swap_control
 */
@@ -2319,7 +2319,7 @@
    return GLX_BAD_CONTEXT;
 }
 
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
 /*
 ** GLX_SGIX_fbconfig
@@ -2346,7 +2346,7 @@
                                  GLXFBConfigSGIX config,
                                  Pixmap pixmap)
 {
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    xGLXVendorPrivateWithReplyReq *vpreq;
    xGLXCreateGLXPixmapWithConfigSGIXReq *req;
    GLXPixmap xid = None;
@@ -2359,7 +2359,7 @@
    if ((dpy == NULL) || (config == NULL)) {
       return None;
    }
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if(apple_glx_pixmap_create(dpy, fbconfig->screen, pixmap, fbconfig))
       return None;
    return pixmap;
@@ -2435,7 +2435,7 @@
    return NULL;
 }
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /*
 ** GLX_SGIX_swap_group
 */
@@ -3026,7 +3026,7 @@
 
 /*@}*/
 
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
 /**
  * \c strdup is actually not a standard ANSI C or POSIX routine.
@@ -3105,7 +3105,7 @@
    GLX_FUNCTION(glXQueryDrawable),
    GLX_FUNCTION(glXSelectEvent),
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    /*** GLX_SGI_swap_control ***/
    GLX_FUNCTION2(glXSwapIntervalSGI, __glXSwapIntervalSGI),
 
@@ -3133,7 +3133,7 @@
    GLX_FUNCTION2(glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig),
    GLX_FUNCTION(glXGetFBConfigFromVisualSGIX),
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    /*** GLX_SGIX_pbuffer ***/
    GLX_FUNCTION(glXCreateGLXPbufferSGIX),
    GLX_FUNCTION(glXDestroyGLXPbufferSGIX),
@@ -3179,7 +3179,7 @@
    /*** GLX 1.4 ***/
    GLX_FUNCTION2(glXGetProcAddress, glXGetProcAddressARB),
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
    /*** GLX_OML_sync_control ***/
    GLX_FUNCTION2(glXWaitForSbcOML, __glXWaitForSbcOML),
    GLX_FUNCTION2(glXWaitForMscOML, __glXWaitForMscOML),
@@ -3201,7 +3201,7 @@
    {NULL, NULL}                 /* end of list */
 };
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 static const GLvoid *
 get_glx_proc_address(const char *funcName)
 {
@@ -3238,7 +3238,7 @@
     * DRI based drivers from searching the core GL function table for
     * internal API functions.
     */
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    f = (gl_function) apple_glx_get_proc_address(procName);
 #else
    f = (gl_function) get_glx_proc_address((const char *) procName);

Modified: AppleSGLX/trunk/glxcurrent.c
===================================================================
--- AppleSGLX/trunk/glxcurrent.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glxcurrent.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -38,7 +38,7 @@
 #endif
 
 #include "glxclient.h"
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 #include <stdlib.h>
 
 #include "apple_glx.h"
@@ -74,7 +74,7 @@
 };
 
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /*
 ** All indirect rendering contexts will share the same indirect dispatch table.
 */
@@ -172,7 +172,7 @@
 __glXSetCurrentContextNull(void)
 {
    __glXSetCurrentContext(&dummyContext);
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #ifdef GLX_DIRECT_RENDERING
    _glapi_set_dispatch(NULL);   /* no-op functions */
 #endif
@@ -203,7 +203,7 @@
 }
 
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 /************************************************************************/
 
 /**
@@ -331,7 +331,7 @@
    _XError(dpy, &error);
 }
 
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
 /**
  * Make a particular context current.
@@ -343,7 +343,7 @@
                    GLXDrawable read, GLXContext gc)
 {
    const GLXContext oldGC = __glXGetCurrentContext();
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    bool error = apple_glx_make_current_context(dpy, 
                    (oldGC && oldGC != &dummyContext) ? oldGC->apple : NULL, 
                    gc ? gc->apple : NULL, draw);
@@ -448,7 +448,7 @@
    }
 #endif
 
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
 
    /* Update our notion of what is current */
    __glXLock();
@@ -471,7 +471,7 @@
          oldGC->currentReadable = None;
          oldGC->currentContextTag = 0;
          oldGC->thread_id = 0;
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
          
          /*
           * At this point we should check if the context has been
@@ -498,7 +498,7 @@
             }
 #endif
             __glXFreeContext(oldGC);
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
          }
       }
       if (gc) {
@@ -507,7 +507,7 @@
          gc->currentDpy = dpy;
          gc->currentDrawable = draw;
          gc->currentReadable = read;
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
          gc->thread_id = _glthread_GetID();
 
 #ifdef GLX_DIRECT_RENDERING
@@ -538,7 +538,7 @@
             gc->currentContextTag = -1;
          }
 #endif
-#endif /* __APPLE__ */
+#endif /* GLX_USE_APPLEGL */
       }
       else {
          __glXSetCurrentContextNull();

Modified: AppleSGLX/trunk/glxext.c
===================================================================
--- AppleSGLX/trunk/glxext.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glxext.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -41,7 +41,7 @@
 #include "glxclient.h"
 #include <X11/extensions/Xext.h>
 #include <X11/extensions/extutil.h>
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 #include "apple_glx.h"
 #include "apple_visual.h"
 #else
@@ -70,7 +70,7 @@
 /* Extension required boiler plate */
 
 static char *__glXExtensionName = GLX_EXTENSION_NAME;
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 static XExtensionInfo __glXExtensionInfo_data;
 XExtensionInfo *__glXExtensionInfo = &__glXExtensionInfo_data;
 #else
@@ -108,7 +108,7 @@
 }
 
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
 static char *__glXErrorString(Display *dpy, int code, XExtCodes *codes, 
                               char *buf, int n);
 #endif
@@ -131,7 +131,7 @@
   __glXErrorString,       /* error_string */
 };
 
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 static
 #endif
 XEXT_GENERATE_FIND_DISPLAY(__glXFindDisplay, __glXExtensionInfo,
@@ -324,7 +324,7 @@
       config->numAuxBuffers = *bp++;
       config->level = *bp++;
 
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
        /* AppleSGLX supports pixmap and pbuffers with all config. */
        config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
        /* Unfortunately this can create an ABI compatibility problem. */
@@ -424,7 +424,7 @@
          break;
       case GLX_DRAWABLE_TYPE:
          config->drawableType = *bp++;
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
          /* AppleSGLX supports pixmap and pbuffers with all config. */
          config->drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;              
 #endif
@@ -447,7 +447,7 @@
       case GLX_MAX_PBUFFER_PIXELS:
          config->maxPbufferPixels = *bp++;
          break;
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
       case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX:
          config->optimalPbufferWidth = *bp++;
          break;
@@ -467,7 +467,7 @@
       case GLX_SAMPLES_SGIS:
          config->samples = *bp++;
          break;
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
       case IGNORE_GLX_SWAP_METHOD_OML:
          /* We ignore this tag.  See the comment above this function. */
          ++bp;
@@ -546,7 +546,7 @@
    m = modes;
    for (i = 0; i < nvisuals; i++) {
       _XRead(dpy, (char *) props, prop_size);
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
        /* Older X servers don't send this so we default it here. */
       m->drawableType = GLX_WINDOW_BIT;
 #else
@@ -788,7 +788,7 @@
    if (glx_direct)
       dpyPriv->driswDisplay = driswCreateDisplay(dpy);
 #endif
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    if (apple_init_glx(dpy) || !AllocAndFetchScreenConfigs(dpy, dpyPriv)) {
 #else
    if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) {

Modified: AppleSGLX/trunk/glxextensions.c
===================================================================
--- AppleSGLX/trunk/glxextensions.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/glxextensions.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -32,7 +32,7 @@
 #include <X11/extensions/extutil.h>
 #include <X11/extensions/Xext.h>
 #include <string.h>
-#ifndef __APPLE__
+#ifndef GLX_USE_APPLEGL
 #include "glapi.h"
 #endif
 #include "glxextensions.h"
@@ -78,7 +78,7 @@
    { GLX(ARB_multisample),             VER(1,4), Y, Y, N, N },
    { GLX(ARB_render_texture),          VER(0,0), N, N, N, N },
    { GLX(ATI_pixel_format_float),      VER(0,0), N, N, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(EXT_import_context),          VER(0,0), N, N, N, N },
    { GLX(EXT_visual_info),             VER(0,0), N, N, N, N },
 #else
@@ -86,7 +86,7 @@
    { GLX(EXT_visual_info),             VER(0,0), Y, Y, N, N },
 #endif
    { GLX(EXT_visual_rating),           VER(0,0), Y, Y, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(MESA_agp_offset),             VER(0,0), N, N, N, N }, /* Deprecated */
    { GLX(MESA_allocate_memory),        VER(0,0), N, N, N, N },
    { GLX(MESA_copy_sub_buffer),        VER(0,0), N, N, N, N },
@@ -97,7 +97,7 @@
 #endif
    { GLX(MESA_pixmap_colormap),        VER(0,0), N, N, N, N }, /* Deprecated */
    { GLX(MESA_release_buffers),        VER(0,0), N, N, N, N }, /* Deprecated */
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(MESA_swap_control),           VER(0,0), N, N, N, N },
    { GLX(MESA_swap_frame_usage),       VER(0,0), N, N, N, N },
 #else
@@ -107,7 +107,7 @@
    { GLX(NV_float_buffer),             VER(0,0), N, N, N, N },
    { GLX(NV_render_depth_texture),     VER(0,0), N, N, N, N },
    { GLX(NV_render_texture_rectangle), VER(0,0), N, N, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(NV_vertex_array_range),       VER(0,0), N, N, N, N }, /* Deprecated */
    { GLX(OML_swap_method),             VER(0,0), N, N, N, N },
    { GLX(OML_sync_control),            VER(0,0), N, N, N, N },
@@ -124,20 +124,20 @@
 #endif
    { GLX(SGIS_blended_overlay),        VER(0,0), N, N, N, N },
    { GLX(SGIS_color_range),            VER(0,0), N, N, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(SGIS_multisample),            VER(0,0), N, N, N, N },
 #else
    { GLX(SGIS_multisample),            VER(0,0), Y, Y, N, N },
 #endif
    { GLX(SGIX_fbconfig),               VER(1,3), Y, Y, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(SGIX_pbuffer),                VER(1,3), N, N, N, N },
 #else
    { GLX(SGIX_pbuffer),                VER(1,3), Y, Y, N, N },
 #endif
    { GLX(SGIX_swap_barrier),           VER(0,0), N, N, N, N },
    { GLX(SGIX_swap_group),             VER(0,0), N, N, N, N },
-#ifdef __APPLE__
+#ifdef GLX_USE_APPLEGL
    { GLX(SGIX_visual_select_group),    VER(0,0), Y, Y, N, N },
    { GLX(EXT_texture_from_pixmap),     VER(0,0), Y, N, N, N },
 #else

Modified: AppleSGLX/trunk/xfont.c
===================================================================
--- AppleSGLX/trunk/xfont.c	2009-12-25 01:20:27 UTC (rev 395)
+++ AppleSGLX/trunk/xfont.c	2009-12-25 17:56:38 UTC (rev 396)
@@ -33,7 +33,7 @@
   called by that routine when direct rendering is enabled.
 */
 
-#if defined(GLX_DIRECT_RENDERING) || defined(__APPLE__)
+#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL)
 
 #include "glxclient.h"
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20091225/bfcc6063/attachment-0001.html>


More information about the Xquartz-changes mailing list