1
2/*
3 * Mesa 3-D graphics library
4 * Version:  3.5
5 *
6 * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
27#ifndef REALGLX_H
28#define REALGLX_H
29
30
31extern struct _glxapi_table *
32_real_GetGLXDispatchTable(void);
33
34
35/*
36 * Basically just need these to prevent compiler warnings.
37 */
38
39
40extern XVisualInfo *
41_real_glXChooseVisual( Display *dpy, int screen, int *list );
42
43extern GLXContext
44_real_glXCreateContext( Display *dpy, XVisualInfo *visinfo,
45                        GLXContext share_list, Bool direct );
46
47extern GLXPixmap
48_real_glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap );
49
50extern GLXPixmap
51_real_glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visinfo,
52                              Pixmap pixmap, Colormap cmap );
53
54extern void
55_real_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
56
57extern void
58_real_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
59                      unsigned long mask );
60
61extern Bool
62_real_glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx );
63
64extern Bool
65_real_glXQueryExtension( Display *dpy, int *errorb, int *event );
66
67extern void
68_real_glXDestroyContext( Display *dpy, GLXContext ctx );
69
70extern Bool
71_real_glXIsDirect( Display *dpy, GLXContext ctx );
72
73extern void
74_real_glXSwapBuffers( Display *dpy, GLXDrawable drawable );
75
76extern void
77_real_glXUseXFont( Font font, int first, int count, int listbase );
78
79extern Bool
80_real_glXQueryVersion( Display *dpy, int *maj, int *min );
81
82extern int
83_real_glXGetConfig( Display *dpy, XVisualInfo *visinfo,
84                    int attrib, int *value );
85
86extern void
87_real_glXWaitGL( void );
88
89
90extern void
91_real_glXWaitX( void );
92
93/* GLX 1.1 and later */
94extern const char *
95_real_glXQueryExtensionsString( Display *dpy, int screen );
96
97/* GLX 1.1 and later */
98extern const char *
99_real_glXQueryServerString( Display *dpy, int screen, int name );
100
101/* GLX 1.1 and later */
102extern const char *
103_real_glXGetClientString( Display *dpy, int name );
104
105
106/*
107 * GLX 1.3 and later
108 */
109
110extern GLXFBConfig *
111_real_glXChooseFBConfig( Display *dpy, int screen,
112                         const int *attribList, int *nitems );
113
114extern int
115_real_glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
116                            int attribute, int *value );
117
118extern GLXFBConfig *
119_real_glXGetFBConfigs( Display *dpy, int screen, int *nelements );
120
121extern XVisualInfo *
122_real_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config );
123
124extern GLXWindow
125_real_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win,
126                       const int *attribList );
127
128extern void
129_real_glXDestroyWindow( Display *dpy, GLXWindow window );
130
131extern GLXPixmap
132_real_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
133                       const int *attribList );
134
135extern void
136_real_glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
137
138extern GLXPbuffer
139_real_glXCreatePbuffer( Display *dpy, GLXFBConfig config,
140                        const int *attribList );
141
142extern void
143_real_glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
144
145extern void
146_real_glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
147                        unsigned int *value );
148
149extern GLXContext
150_real_glXCreateNewContext( Display *dpy, GLXFBConfig config,
151                           int renderType, GLXContext shareList, Bool direct );
152
153
154extern Bool
155_real_glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
156                             GLXDrawable read, GLXContext ctx );
157
158extern int
159_real_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value );
160
161extern void
162_real_glXSelectEvent( Display *dpy, GLXDrawable drawable, unsigned long mask );
163
164extern void
165_real_glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
166                           unsigned long *mask );
167
168#ifdef GLX_SGI_swap_control
169extern int
170_real_glXSwapIntervalSGI(int interval);
171#endif
172
173
174#ifdef GLX_SGI_video_sync
175extern int
176_real_glXGetVideoSyncSGI(unsigned int *count);
177
178extern int
179_real_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count);
180#endif
181
182
183#ifdef GLX_SGI_make_current_read
184extern Bool
185_real_glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
186
187extern GLXDrawable
188_real_glXGetCurrentReadDrawableSGI(void);
189#endif
190
191#if defined(_VL_H) && defined(GLX_SGIX_video_source)
192extern GLXVideoSourceSGIX
193_real_glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
194
195extern void
196_real_glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src);
197#endif
198
199#ifdef GLX_EXT_import_context
200extern void
201_real_glXFreeContextEXT(Display *dpy, GLXContext context);
202
203extern GLXContextID
204_real_glXGetContextIDEXT(const GLXContext context);
205
206extern Display *
207_real_glXGetCurrentDisplayEXT(void);
208
209extern GLXContext
210_real_glXImportContextEXT(Display *dpy, GLXContextID contextID);
211
212extern int
213_real_glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *value);
214#endif
215
216#ifdef GLX_SGIX_fbconfig
217extern int
218_real_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
219
220extern GLXFBConfigSGIX *
221_real_glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements);
222
223extern GLXPixmap
224_real_glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
225
226extern GLXContext
227_real_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
228
229extern XVisualInfo *
230_real_glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config);
231
232extern GLXFBConfigSGIX
233_real_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis);
234#endif
235
236#ifdef GLX_SGIX_pbuffer
237extern GLXPbufferSGIX
238_real_glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
239
240extern void
241_real_glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf);
242
243extern int
244_real_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
245
246extern void
247_real_glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask);
248
249extern void
250_real_glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask);
251#endif
252
253#ifdef GLX_SGI_cushion
254extern void
255_real_glXCushionSGI(Display *dpy, Window win, float cushion);
256#endif
257
258#ifdef GLX_SGIX_video_resize
259extern int
260_real_glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window);
261
262extern int
263_real_glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h);
264
265extern int
266_real_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h);
267
268extern int
269_real_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
270
271extern int
272_real_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype);
273#endif
274
275#if defined(_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer)
276extern Bool
277_real_glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
278#endif
279
280#ifdef GLX_SGIX_swap_group
281extern void
282_real_glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member);
283#endif
284
285#ifdef GLX_SGIX_swap_barrier
286extern void
287_real_glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier);
288
289extern Bool
290_real_glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max);
291#endif
292
293#ifdef GLX_SUN_get_transparent_index
294extern Status
295_real_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent);
296#endif
297
298#ifdef GLX_MESA_release_buffers
299extern Bool
300_real_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
301#endif
302
303#ifdef GLX_MESA_set_3dfx_mode
304extern Bool
305_real_glXSet3DfxModeMESA( int mode );
306#endif
307
308#ifdef GLX_NV_vertex_array_range
309extern void *
310_real_glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
311extern void
312_real_glXFreeMemoryNV(GLvoid *pointer);
313#endif
314
315#ifdef GLX_MESA_agp_offset
316extern GLuint
317_real_glXGetAGPOffsetMESA(const GLvoid *pointer);
318#endif
319
320#ifdef GLX_MESA_copy_sub_buffer
321extern void
322_real_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
323                            int x, int y, int width, int height );
324#endif
325
326#endif /* REALGLX_H */
327