Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / progs / xdemos / pbutil.h
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
29 extern int
30 QueryFBConfig(Display *dpy, int screen);
31
32 extern int
33 QueryPbuffers(Display *dpy, int screen);
34
35
36 extern void
37 PrintFBConfigInfo(Display *dpy, int screen, FBCONFIG config, Bool horizFormat);
38
39
40 extern FBCONFIG *
41 ChooseFBConfig(Display *dpy, int screen, const int attribs[], int *nConfigs);
42
43
44 extern FBCONFIG *
45 GetAllFBConfigs(Display *dpy, int screen, int *nConfigs);
46
47
48 extern XVisualInfo *
49 GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config);
50
51
52 extern GLXContext
53 CreateContext(Display *dpy, int screen, FBCONFIG config);
54
55
56 extern void
57 DestroyContext(Display *dpy, GLXContext ctx);
58
59
60 extern PBUFFER
61 CreatePbuffer(Display *dpy, int screen, FBCONFIG config,
62 int width, int height, Bool preserve, Bool largest);
63
64
65 extern void
66 DestroyPbuffer(Display *dpy, int screen, PBUFFER pbuffer);
67
68
69 #endif /*PBUTIL_H*/