#include "glapi.h"
#include "glxextensions.h"
#include "glcontextmodes.h"
+#include "glheader.h"
#ifdef IN_DOXYGEN
#define GLX_PREFIX(x) x
{
xGLXCreateWindowReq * req;
CARD32 * data;
- unsigned int i;
-
+ unsigned int i;
- for ( i = 0 ; attrib_list[i * 2] != None ; i++ )
- /* empty */ ;
+ i = 0;
+ if (attrib_list) {
+ while (attrib_list[i * 2] != None)
+ i++;
+ }
LockDisplay(dpy);
- GetReqExtra( GLXCreateWindow, 20 + (8 * i), req );
+ GetReqExtra( GLXCreateWindow, 8 * i, req );
data = (CARD32 *) (req + 1);
req->reqType = __glXSetupForCommand(dpy);
req->screen = (CARD32) fbconfig->screen;
req->fbconfig = fbconfig->fbconfigID;
req->window = (GLXPbuffer) drawable;
+ req->glxwindow = (GLXWindow) XAllocID(dpy);
req->numAttribs = (CARD32) i;
+ memcpy( data, attrib_list, 8 * i );
+
UnlockDisplay(dpy);
SyncHandle();
- return drawable;
+ return (GLXDrawable)req->glxwindow;
}
CARD32 * data;
unsigned int i;
-
- for ( i = 0 ; attrib_list[i * 2] != None ; i++ )
- /* empty */ ;
-
+ i = 0;
+ if (attrib_list) {
+ while (attrib_list[i * 2])
+ i++;
+ }
LockDisplay(dpy);
id = XAllocID(dpy);
/**
* Create a new pbuffer.
*/
-GLXPbufferSGIX
+PUBLIC GLXPbufferSGIX
GLX_PREFIX(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config,
unsigned int width, unsigned int height,
int *attrib_list)
/**
* Create a new pbuffer.
*/
-GLXPbuffer
+PUBLIC GLXPbuffer
GLX_PREFIX(glXCreatePbuffer)(Display *dpy, GLXFBConfig config,
const int *attrib_list)
{
/**
* Destroy an existing pbuffer.
*/
-void
+PUBLIC void
GLX_PREFIX(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf)
{
DestroyPbuffer( dpy, pbuf );
/**
* Query an attribute of a drawable.
*/
-void
+PUBLIC void
GLX_PREFIX(glXQueryDrawable)(Display *dpy, GLXDrawable drawable,
int attribute, unsigned int *value)
{
/**
* Query an attribute of a pbuffer.
*/
-int
+PUBLIC int
GLX_PREFIX(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbufferSGIX drawable,
int attribute, unsigned int *value)
{
/**
* Select the event mask for a drawable.
*/
-void
+PUBLIC void
GLX_PREFIX(glXSelectEvent)(Display *dpy, GLXDrawable drawable,
unsigned long mask)
{
/**
* Get the selected event mask for a drawable.
*/
-void
+PUBLIC void
GLX_PREFIX(glXGetSelectedEvent)(Display *dpy, GLXDrawable drawable,
unsigned long *mask)
{
}
-GLXPixmap
+PUBLIC GLXPixmap
GLX_PREFIX(glXCreatePixmap)( Display *dpy, GLXFBConfig config, Pixmap pixmap,
const int *attrib_list )
{
}
-GLXWindow
+PUBLIC GLXWindow
GLX_PREFIX(glXCreateWindow)( Display *dpy, GLXFBConfig config, Window win,
const int *attrib_list )
{
}
-void
+PUBLIC void
GLX_PREFIX(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap)
{
DestroyDrawable( dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap );
}
-void
+PUBLIC void
GLX_PREFIX(glXDestroyWindow)(Display *dpy, GLXWindow win)
{
DestroyDrawable( dpy, (GLXDrawable) win, X_GLXDestroyWindow );
}
-GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
+PUBLIC GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
(Display *dpy, GLXPbufferSGIX pbuf),
(dpy, pbuf),
glXDestroyPbuffer)
-GLX_ALIAS_VOID(glXSelectEventSGIX,
+PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX,
(Display *dpy, GLXDrawable drawable, unsigned long mask),
(dpy, drawable, mask),
glXSelectEvent)
-GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
+PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
(Display *dpy, GLXDrawable drawable, unsigned long *mask),
(dpy, drawable, mask),
glXGetSelectedEvent)