* 10. Given that, this routine should try to use an array on the stack to
* capture the reply rather than always calling Xmalloc.
*/
-static int
-GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
- int attribute, unsigned int *value)
+int
+__glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable,
+ int attribute, unsigned int *value)
{
struct glx_display *priv;
xGLXGetDrawableAttributesReply reply;
UnlockDisplay(dpy);
SyncHandle();
- return 0;
+ return 1;
}
static void
}
}
#else
- GetDrawableAttribute(dpy, drawable, attribute, value);
+ __glXGetDrawableAttribute(dpy, drawable, attribute, value);
#endif
}
/**
* Query an attribute of a pbuffer.
*/
-_GLX_PUBLIC int
+_GLX_PUBLIC void
glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
int attribute, unsigned int *value)
{
- return GetDrawableAttribute(dpy, drawable, attribute, value);
+ __glXGetDrawableAttribute(dpy, drawable, attribute, value);
}
#endif
__glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes,
true);
#else
- unsigned int value;
+ unsigned int value = 0;
/* The non-sense with value is required because on LP64 platforms
* we could just type-cast the pointer, but why?
*/
- GetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value);
+ __glXGetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value);
*mask = value;
#endif
}
#endif
}
-#ifndef GLX_USE_APPLEGL
_GLX_PUBLIC
GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
(Display * dpy, GLXPbufferSGIX pbuf),
(Display * dpy, GLXDrawable drawable,
unsigned long *mask), (dpy, drawable, mask),
glXGetSelectedEvent)
-#endif