summaryrefslogtreecommitdiffstats
path: root/progs/xdemos/pbutil.h
blob: 68ba8808c2cc609403ca9c57fbfc83a0a4379897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * 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 XVisualInfo *
GetVisualFromFBConfig(Display *dpy, int screen, FBCONFIG config);


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*/