diff options
author | Brian Paul <[email protected]> | 2005-01-04 00:58:29 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-01-04 00:58:29 +0000 |
commit | f72e4424d960b1751845d9e0579e8fdcca93b3d0 (patch) | |
tree | 195eb903de1a6d6c39a72c062a47701355c963d2 /progs/xdemos/pbutil.h | |
parent | e3748eb19ba444f411ad66905dfddbe809225ca0 (diff) |
Use the GLX 1.3 pbuffer/fbconfig functions in preference to the SGIX ones.
Added more functions to pbutil.[ch] to better isolate API differences.
Diffstat (limited to 'progs/xdemos/pbutil.h')
-rw-r--r-- | progs/xdemos/pbutil.h | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/progs/xdemos/pbutil.h b/progs/xdemos/pbutil.h index d13c969c4c8..68ba8808c2c 100644 --- a/progs/xdemos/pbutil.h +++ b/progs/xdemos/pbutil.h @@ -1,4 +1,3 @@ - /* * OpenGL pbuffers utility functions. * @@ -15,23 +14,41 @@ #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); -#ifdef GLX_SGIX_fbconfig +extern void +PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat); + +extern FBCONFIG * +ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs); -extern void -PrintFBConfigInfo(Display *dpy, GLXFBConfigSGIX fbConfig, Bool horizFormat); +extern XVisualInfo * +GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config); -extern GLXPbufferSGIX -CreatePbuffer( Display *dpy, GLXFBConfigSGIX fbConfig, - int width, int height, int *pbAttribs ); +extern PBUFFER +CreatePbuffer(Display *dpy, int screen, FBCONFIG config, + int width, int height, Bool preserve, Bool largest); -#endif /*GLX_SGIX_fbconfig*/ + +extern void +DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer); #endif /*PBUTIL_H*/ |