132001f49Smrg/* 232001f49Smrg * OpenGL pbuffers utility functions. 332001f49Smrg * 432001f49Smrg * Brian Paul 532001f49Smrg * April 1997 632001f49Smrg */ 732001f49Smrg 832001f49Smrg 932001f49Smrg#ifndef PBUTIL_H 1032001f49Smrg#define PBUTIL_H 1132001f49Smrg 1232001f49Smrg 1332001f49Smrg#define GLX_GLXEXT_PROTOTYPES 1432001f49Smrg#include <GL/glx.h> 1532001f49Smrg 1632001f49Smrg 1732001f49Smrg#if defined(GLX_VERSION_1_3) 1832001f49Smrg#define PBUFFER GLXPbuffer 1932001f49Smrg#define FBCONFIG GLXFBConfig 2032001f49Smrg#elif defined(GLX_SGIX_fbconfig) && defined(GLX_SGIX_pbuffer) 2132001f49Smrg#define PBUFFER GLXPbufferSGIX 2232001f49Smrg#define FBCONFIG GLXFBConfigSGIX 2332001f49Smrg#else 2432001f49Smrg#define PBUFFER int 2532001f49Smrg#define FBCONFIG int 2632001f49Smrg#endif 2732001f49Smrg 2832001f49Smrg 2932001f49Smrgextern int 3032001f49SmrgQueryFBConfig(Display *dpy, int screen); 3132001f49Smrg 3232001f49Smrgextern int 3332001f49SmrgQueryPbuffers(Display *dpy, int screen); 3432001f49Smrg 3532001f49Smrg 3632001f49Smrgextern void 3732001f49SmrgPrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat); 3832001f49Smrg 3932001f49Smrg 4032001f49Smrgextern FBCONFIG * 4132001f49SmrgChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs); 4232001f49Smrg 4332001f49Smrg 4432001f49Smrgextern FBCONFIG * 4532001f49SmrgGetAllFBConfigs(Display *dpy, int screen, int *nConfigs); 4632001f49Smrg 4732001f49Smrg 4832001f49Smrgextern XVisualInfo * 4932001f49SmrgGetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config); 5032001f49Smrg 5132001f49Smrg 5232001f49Smrgextern GLXContext 5332001f49SmrgCreateContext(Display *dpy, int screen, FBCONFIG config); 5432001f49Smrg 5532001f49Smrg 5632001f49Smrgextern void 5732001f49SmrgDestroyContext(Display *dpy, GLXContext ctx); 5832001f49Smrg 5932001f49Smrg 6032001f49Smrgextern PBUFFER 6132001f49SmrgCreatePbuffer(Display *dpy, int screen, FBCONFIG config, 6232001f49Smrg int width, int height, Bool preserve, Bool largest); 6332001f49Smrg 6432001f49Smrg 6532001f49Smrgextern void 6632001f49SmrgDestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer); 6732001f49Smrg 6832001f49Smrg 6932001f49Smrg#endif /*PBUTIL_H*/ 70