diff options
author | Kyle Brenneman <kbrenneman@nvidia.com> | 2016-02-26 14:05:38 -0700 |
---|---|---|
committer | Kyle Brenneman <kbrenneman@nvidia.com> | 2016-02-29 13:50:35 -0700 |
commit | b8e2cec4b4400711520cb4f13860455d311761a6 (patch) | |
tree | 8accc137f1dfa63ea1b5d1721b148690d1b789af /include | |
parent | 233b274be11d586f1e246088901d1d69cc2583b7 (diff) |
GLX: Return failures from the addVendor*Mapping functions.
The addVendorContextMapping, addVendorFBConfigMapping, and
addVendorDrawableMapping functions in __GLXapiExports now return an int to
indicate success or failure.
Updated the various GLX functions so that they will deal with those failures.
In the case of context and drawable creations functions, it will call back into
the vendor library to destroy the object before returning.
Diffstat (limited to 'include')
-rw-r--r-- | include/glvnd/libglxabi.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/glvnd/libglxabi.h b/include/glvnd/libglxabi.h index 23b8303..74d2287 100644 --- a/include/glvnd/libglxabi.h +++ b/include/glvnd/libglxabi.h @@ -158,8 +158,13 @@ typedef struct __GLXapiExportsRec { * Records the screen number and vendor for a context. The screen and * vendor must be the ones returned for the XVisualInfo or GLXFBConfig that * the context is created from. + * + * \param dpy The display pointer. + * \param context The context handle. + * \param vendor The vendor that created the context. + * \return Zero on success, non-zero on error. */ - void (*addVendorContextMapping)(Display *dpy, GLXContext context, __GLXvendorInfo *vendor); + int (*addVendorContextMapping)(Display *dpy, GLXContext context, __GLXvendorInfo *vendor); /*! * Removes a mapping from context to vendor. The context must have been @@ -186,7 +191,7 @@ typedef struct __GLXapiExportsRec { */ int (*vendorFromContext)(GLXContext context, __GLXvendorInfo **retVendor); - void (*addVendorFBConfigMapping)(Display *dpy, GLXFBConfig config, __GLXvendorInfo *vendor); + int (*addVendorFBConfigMapping)(Display *dpy, GLXFBConfig config, __GLXvendorInfo *vendor); void (*removeVendorFBConfigMapping)(Display *dpy, GLXFBConfig config); int (*vendorFromFBConfig)(Display *dpy, GLXFBConfig config, __GLXvendorInfo **retVendor); @@ -194,7 +199,7 @@ typedef struct __GLXapiExportsRec { void (*removeScreenVisualMapping)(Display *dpy, const XVisualInfo *visual); int (*vendorFromVisual)(Display *dpy, const XVisualInfo *visual, __GLXvendorInfo **retVendor); - void (*addVendorDrawableMapping)(Display *dpy, GLXDrawable drawable, __GLXvendorInfo *vendor); + int (*addVendorDrawableMapping)(Display *dpy, GLXDrawable drawable, __GLXvendorInfo *vendor); void (*removeVendorDrawableMapping)(Display *dpy, GLXDrawable drawable); /*! |