#ifndef _GLX_client_h_
#define _GLX_client_h_
-#define NEED_REPLIES
-#define NEED_EVENTS
#include <X11/Xproto.h>
#include <X11/Xlibint.h>
#include <X11/extensions/extutil.h>
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
*/
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if defined(__GNUC__)
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
#else
#define containerOf(ptr, type, member) \
(type *)( (char *)ptr - offsetof(type,member) )
-#include <GL/internal/dri_interface.h>
+extern void DRI_glXUseXFont(Font font, int first, int count, int listbase);
+
+#endif
+
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+#include <GL/internal/dri_interface.h>
/**
* Display dependent methods. This structure is initialized during the
extern void dri2InvalidateBuffers(Display *dpy, XID drawable);
-extern void DRI_glXUseXFont(Font font, int first, int count, int listbase);
-
/*
** Functions to obtain driver configuration information from a direct
** rendering client application
__GLXattribute **stackPointer;
} __GLXattributeMachine;
+struct glx_context_vtable {
+ void (*bind_tex_image)(Display * dpy,
+ GLXDrawable drawable,
+ int buffer, const int *attrib_list);
+ void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer);
+
+};
+
/**
* GLX state that needs to be kept on the client. One of these records
* exist for each context that has been made current by this client.
const __GLcontextModes *mode;
#ifdef GLX_DIRECT_RENDERING
+#ifdef GLX_USE_APPLEGL
+ void *driContext;
+ Bool do_destroy;
+#else
__GLXDRIcontext *driContext;
__DRIcontext *__driContext;
+#endif
#endif
/**
unsigned long thread_id;
char gl_extension_bits[__GL_EXT_BYTES];
+
+ const struct glx_context_vtable *vtable;
};
#define __glXSetError(gc,code) \
*/
char *effectiveGLXexts;
-#ifdef GLX_DIRECT_RENDERING
+ /**
+ * Context vtable to use for direct contexts on this screen
+ */
+ const struct glx_context_vtable *direct_context_vtable;
+
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/**
* Per screen direct rendering interface functions and data.
*/
const __DRI2flushExtension *f;
#endif
+#ifdef __DRI2_CONFIG_QUERY
+ const __DRI2configQueryExtension *config;
+#endif
+
#endif
/**
*/
__GLXscreenConfigs *screenConfigs;
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/**
* Per display direct rendering interface functions and data.
*/
int32_t * numerator,
int32_t * denominator);
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
GLboolean
__driGetMscRateOML(__DRIdrawable * draw,
int32_t * numerator, int32_t * denominator, void *private);