#include <inttypes.h>
#include "glxclient.h"
-#include <extutil.h>
-#include <Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/Xext.h>
#include <assert.h>
#include <string.h>
#include "glapi.h"
#ifdef GLX_DIRECT_RENDERING
#include "indirect_init.h"
-#include "xf86vmode.h"
+#include <X11/extensions/xf86vmode.h>
#include "xf86dri.h"
#endif
#include "glxextensions.h"
__glXCalculateUsableExtensions(psc,
#ifdef GLX_DIRECT_RENDERING
- (priv->driDisplay.private != NULL),
+ (psc->driScreen.private != NULL),
#else
GL_FALSE,
#endif
}
/*@}*/
+PUBLIC Bool glXBindTexImageEXT(Display *dpy,
+ GLXDrawable drawable,
+ int buffer)
+{
+ xGLXVendorPrivateReq *req;
+ GLXContext gc = __glXGetCurrentContext();
+ CARD32 *drawable_ptr;
+ INT32 *buffer_ptr;
+ CARD8 opcode;
+ if (gc == NULL)
+ return False;
+
+#ifdef GLX_DIRECT_RENDERING
+ if (gc->isDirect)
+ return False;
+#endif
+
+ opcode = __glXSetupForCommand(dpy);
+ if (!opcode)
+ return False;
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivate, sizeof(CARD32)+sizeof(INT32),req);
+ req->reqType = opcode;
+ req->glxCode = X_GLXVendorPrivate;
+ req->vendorCode = X_GLXvop_BindTexImageEXT;
+ req->contextTag = gc->currentContextTag;
+
+ drawable_ptr = (CARD32 *) (req + 1);
+ buffer_ptr = (INT32 *) (drawable_ptr + 1);
+
+ *drawable_ptr = drawable;
+ *buffer_ptr = buffer;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return True;
+}
+
+PUBLIC Bool glXReleaseTexImageEXT(Display *dpy,
+ GLXDrawable drawable,
+ int buffer)
+{
+ xGLXVendorPrivateReq *req;
+ GLXContext gc = __glXGetCurrentContext();
+ CARD32 *drawable_ptr;
+ INT32 *buffer_ptr;
+ CARD8 opcode;
+
+ if (gc == NULL)
+ return False;
+
+#ifdef GLX_DIRECT_RENDERING
+ if (gc->isDirect)
+ return False;
+#endif
+
+ opcode = __glXSetupForCommand(dpy);
+ if (!opcode)
+ return False;
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivate, sizeof(CARD32)+sizeof(INT32),req);
+ req->reqType = opcode;
+ req->glxCode = X_GLXVendorPrivate;
+ req->vendorCode = X_GLXvop_ReleaseTexImageEXT;
+ req->contextTag = gc->currentContextTag;
+
+ drawable_ptr = (CARD32 *) (req + 1);
+ buffer_ptr = (INT32 *) (drawable_ptr + 1);
+
+ *drawable_ptr = drawable;
+ *buffer_ptr = buffer;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return True;
+}
/**
* \c strdup is actually not a standard ANSI C or POSIX routine.
GLX_FUNCTION( glXGetMscRateOML ),
GLX_FUNCTION( glXGetSyncValuesOML ),
+ /*** GLX_EXT_texture_from_pixmap ***/
+ GLX_FUNCTION( glXBindTexImageEXT ),
+ GLX_FUNCTION( glXReleaseTexImageEXT ),
+
#ifdef GLX_DIRECT_RENDERING
/*** DRI configuration ***/
GLX_FUNCTION( glXGetScreenDriver ),