1/* 2 * OpenGL pbuffers utility functions. 3 * 4 * Brian Paul 5 * April 1997 6 */ 7 8 9#ifndef PBUTIL_H 10#define PBUTIL_H 11 12 13#define GLX_GLXEXT_PROTOTYPES 14#include <GL/glx.h> 15 16 17#if defined(GLX_VERSION_1_3) 18#define PBUFFER GLXPbuffer 19#define FBCONFIG GLXFBConfig 20#elif defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) 21#define PBUFFER GLXPbufferSGIX 22#define FBCONFIG GLXFBConfigSGIX 23#else 24#define PBUFFER int 25#define FBCONFIG int 26#endif 27 28 29extern int 30QueryFBConfig(Display *dpy, int screen); 31 32extern int 33QueryPbuffers(Display *dpy, int screen); 34 35 36extern void 37PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat); 38 39 40extern FBCONFIG * 41ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs); 42 43 44extern FBCONFIG * 45GetAllFBConfigs(Display *dpy, int screen, int *nConfigs); 46 47 48extern XVisualInfo * 49GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config); 50 51 52extern GLXContext 53CreateContext(Display *dpy, int screen, FBCONFIG config); 54 55 56extern void 57DestroyContext(Display *dpy, GLXContext ctx); 58 59 60extern PBUFFER 61CreatePbuffer(Display *dpy, int screen, FBCONFIG config, 62 int width, int height, Bool preserve, Bool largest); 63 64 65extern void 66DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer); 67 68 69#endif /*PBUTIL_H*/ 70