#include "glxextensions.h"
#include "glcontextmodes.h"
+#define WARN_ONCE_GLX_1_3(a, b) { \
+ static int warned=1; \
+ if(warned) { \
+ warn_GLX_1_3((a), b ); \
+ warned=0; \
+ } \
+ }
/**
* Emit a warning when clients use GLX 1.3 functions on pre-1.3 systems.
width = 0;
height = 0;
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
for (i = 0; attrib_list[i * 2]; i++) {
switch (attrib_list[i * 2]) {
glXQueryDrawable(Display * dpy, GLXDrawable drawable,
int attribute, unsigned int *value)
{
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
GetDrawableAttribute(dpy, drawable, attribute, value);
}
glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap,
const int *attrib_list)
{
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
return CreateDrawable(dpy, (__GLcontextModes *) config,
(Drawable) pixmap, attrib_list, X_GLXCreatePixmap);
glXCreateWindow(Display * dpy, GLXFBConfig config, Window win,
const int *attrib_list)
{
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
return CreateDrawable(dpy, (__GLcontextModes *) config,
(Drawable) win, attrib_list, X_GLXCreateWindow);
PUBLIC void
glXDestroyPixmap(Display * dpy, GLXPixmap pixmap)
{
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
DestroyDrawable(dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap);
}
PUBLIC void
glXDestroyWindow(Display * dpy, GLXWindow win)
{
- warn_GLX_1_3(dpy, __func__);
+ WARN_ONCE_GLX_1_3(dpy, __func__);
DestroyDrawable(dpy, (GLXDrawable) win, X_GLXDestroyWindow);
}
(Display * dpy, GLXDrawable drawable,
unsigned long *mask), (dpy, drawable, mask),
glXGetSelectedEvent)
+