diff options
author | Thierry Reding <[email protected]> | 2006-10-14 03:46:41 +0000 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2006-10-14 03:46:41 +0000 |
commit | 1ddf606332a188e46a47607cd41eb5d81bdf4c8a (patch) | |
tree | 8cb51078803106d87aedeae7bbd7a762a0d369d1 /progs/xdemos/pbutil.h |
Import Mesa 6.5.1 (MesaLib, MesaDemos, MesaGLUT).
Diffstat (limited to 'progs/xdemos/pbutil.h')
-rw-r--r-- | progs/xdemos/pbutil.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/progs/xdemos/pbutil.h b/progs/xdemos/pbutil.h new file mode 100644 index 00000000000..e95b2565a23 --- /dev/null +++ b/progs/xdemos/pbutil.h @@ -0,0 +1,66 @@ +/* + * OpenGL pbuffers utility functions. + * + * Brian Paul + * April 1997 + */ + + +#ifndef PBUTIL_H +#define PBUTIL_H + + +#define GLX_GLXEXT_PROTOTYPES +#include <GL/glx.h> + + +#if defined(GLX_VERSION_1_3) +#define PBUFFER GLXPbuffer +#define FBCONFIG GLXFBConfig +#elif defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) +#define PBUFFER GLXPbufferSGIX +#define FBCONFIG GLXFBConfigSGIX +#else +#define PBUFFER int +#define FBCONFIG int +#endif + + +extern int +QueryPbuffers(Display *dpy, int screen); + + +extern void +PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat); + + +extern FBCONFIG * +ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs); + + +extern FBCONFIG * +GetAllFBConfigs(Display *dpy, int screen, int *nConfigs); + + +extern XVisualInfo * +GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config); + + +extern GLXContext +CreateContext(Display *dpy, int screen, FBCONFIG config); + + +extern void +DestroyContext(Display *dpy, GLXContext ctx); + + +extern PBUFFER +CreatePbuffer(Display *dpy, int screen, FBCONFIG config, + int width, int height, Bool preserve, Bool largest); + + +extern void +DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer); + + +#endif /*PBUTIL_H*/ |