#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>
*/
void (*destroyDisplay) (__GLXDRIdisplay * display);
- __GLXDRIscreen *(*createScreen) (__GLXscreenConfigs * psc, int screen,
- __GLXdisplayPrivate * priv);
+ __GLXscreenConfigs *(*createScreen)(int screen, __GLXdisplayPrivate * priv);
};
struct __GLXDRIscreenRec {
int64_t *msc, int64_t *sbc);
int (*waitForSBC)(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
int64_t *msc, int64_t *sbc);
- void (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval);
+ int (*setSwapInterval)(__GLXDRIdrawable *pdraw, int interval);
int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
};
XID drawable;
__GLXscreenConfigs *psc;
GLenum textureTarget;
- __DRIdrawable *driDrawable;
GLenum textureFormat; /* EXT_texture_from_pixmap support */
+ unsigned long eventMask;
};
/*
__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.
unsigned long thread_id;
char gl_extension_bits[__GL_EXT_BYTES];
+
+ const struct glx_context_vtable *vtable;
};
#define __glXSetError(gc,code) \
*/
char *effectiveGLXexts;
+ /**
+ * Context vtable to use for direct contexts on this screen
+ */
+ const struct glx_context_vtable *direct_context_vtable;
+
+ __GLXdisplayPrivate *display;
+
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/**
* Per screen direct rendering interface functions and data.
*/
- __DRIscreen *__driScreen;
- const __DRIcoreExtension *core;
- const __DRIlegacyExtension *legacy;
- const __DRIswrastExtension *swrast;
- const __DRIdri2Extension *dri2;
__glxHashTable *drawHash;
Display *dpy;
- int scr, fd;
- void *driver;
+ int scr;
__GLXDRIscreen *driScreen;
const __DRIcopySubBufferExtension *driCopySubBuffer;
#endif
-#ifdef __DRI_SWAP_CONTROL
- const __DRIswapControlExtension *swapControl;
-#endif
-
-#ifdef __DRI_ALLOCATE
- const __DRIallocateExtension *allocate;
-#endif
-
-#ifdef __DRI_FRAME_TRACKING
- const __DRIframeTrackingExtension *frameTracking;
-#endif
-
-#ifdef __DRI_MEDIA_STREAM_COUNTER
- const __DRImediaStreamCounterExtension *msc;
-#endif
-
-#ifdef __DRI_TEX_BUFFER
- const __DRItexBufferExtension *texBuffer;
-#endif
-
-#ifdef __DRI2_FLUSH
- const __DRI2flushExtension *f;
-#endif
-
#endif
/**
* Also, per screen data which now includes the server \c GLX_EXTENSION
* string.
*/
- __GLXscreenConfigs *screenConfigs;
+ __GLXscreenConfigs **screenConfigs;
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/**
#endif
};
+extern int
+glx_screen_init(__GLXscreenConfigs *psc,
+ int screen, __GLXdisplayPrivate * priv);
+
+extern __GLXDRIdrawable *
+dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id);
extern GLubyte *__glXFlushRenderBuffer(__GLXcontext *, GLubyte *);