diff options
author | Ian Romanick <[email protected]> | 2009-09-15 13:13:35 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-09-15 13:13:35 -0700 |
commit | 6c6fe0a7040cb7355abefcd6621b67d0458311ae (patch) | |
tree | 280dcc9537106e9432ded3b737713ae3d053682d | |
parent | 5d526ed21ac9f1ec9220c2adb4c905893eb9d990 (diff) | |
parent | 1f309c40b8065b8729fce631540c66e4b50b84df (diff) |
Merge commit 'origin/mesa_7_5_branch' into mesa_7_6_branch
-rw-r--r-- | src/glx/x11/glx_pbuffer.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c index 88a17df6f8d..01569213f2d 100644 --- a/src/glx/x11/glx_pbuffer.c +++ b/src/glx/x11/glx_pbuffer.c @@ -41,6 +41,23 @@ /** + * Emit a warning when clients use GLX 1.3 functions on pre-1.3 systems. + */ +static void +warn_GLX_1_3(Display *dpy, const char *function_name) +{ + __GLXdisplayPrivate *priv = __glXInitialize(dpy); + + if (priv->minorVersion < 3) { + fprintf(stderr, + "WARNING: Application calling GLX 1.3 function \"%s\" " + "when GLX 1.3 is not supported! This is an application bug!\n", + function_name); + } +} + + +/** * Change a drawable's attribute. * * This function is used to implement \c glXSelectEvent and @@ -559,6 +576,8 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) width = 0; height = 0; + warn_GLX_1_3(dpy, __func__); + for (i = 0; attrib_list[i * 2]; i++) { switch (attrib_list[i * 2]) { case GLX_PBUFFER_WIDTH: @@ -592,6 +611,7 @@ PUBLIC void glXQueryDrawable(Display * dpy, GLXDrawable drawable, int attribute, unsigned int *value) { + warn_GLX_1_3(dpy, __func__); GetDrawableAttribute(dpy, drawable, attribute, value); } @@ -645,6 +665,8 @@ PUBLIC GLXPixmap glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list) { + warn_GLX_1_3(dpy, __func__); + return CreateDrawable(dpy, (__GLcontextModes *) config, (Drawable) pixmap, attrib_list, X_GLXCreatePixmap); } @@ -654,6 +676,8 @@ PUBLIC GLXWindow glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, const int *attrib_list) { + warn_GLX_1_3(dpy, __func__); + return CreateDrawable(dpy, (__GLcontextModes *) config, (Drawable) win, attrib_list, X_GLXCreateWindow); } @@ -662,6 +686,8 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, PUBLIC void glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) { + warn_GLX_1_3(dpy, __func__); + DestroyDrawable(dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap); } @@ -669,6 +695,8 @@ glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) PUBLIC void glXDestroyWindow(Display * dpy, GLXWindow win) { + warn_GLX_1_3(dpy, __func__); + DestroyDrawable(dpy, (GLXDrawable) win, X_GLXDestroyWindow); } |