DRI2: Drop sarea, implement swap buffers in the X server.
[mesa.git] / src / glx / x11 / glxclient.h
1 /*
2 ** License Applicability. Except to the extent portions of this file are
3 ** made subject to an alternative license as permitted in the SGI Free
4 ** Software License B, Version 1.1 (the "License"), the contents of this
5 ** file are subject only to the provisions of the License. You may not use
6 ** this file except in compliance with the License. You may obtain a copy
7 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
8 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
9 **
10 ** http://oss.sgi.com/projects/FreeB
11 **
12 ** Note that, as provided in the License, the Software is distributed on an
13 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
14 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
15 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
16 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
17 **
18 ** Original Code. The Original Code is: OpenGL Sample Implementation,
19 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
20 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
21 ** Copyright in any portions created by third parties is as indicated
22 ** elsewhere herein. All Rights Reserved.
23 **
24 ** Additional Notice Provisions: The application programming interfaces
25 ** established by SGI in conjunction with the Original Code are The
26 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
27 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
28 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
29 ** Window System(R) (Version 1.3), released October 19, 1998. This software
30 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
31 ** published by SGI, but has not been independently verified as being
32 ** compliant with the OpenGL(R) version 1.2.1 Specification.
33 */
34 /* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.21 2004/02/09 23:46:31 alanh Exp $ */
35
36 /**
37 * \file glxclient.h
38 * Direct rendering support added by Precision Insight, Inc.
39 *
40 * \author Kevin E. Martin <kevin@precisioninsight.com>
41 */
42
43 #ifndef _GLX_client_h_
44 #define _GLX_client_h_
45 #define NEED_REPLIES
46 #define NEED_EVENTS
47 #include <X11/Xproto.h>
48 #include <X11/Xlibint.h>
49 #define GLX_GLXEXT_PROTOTYPES
50 #include <GL/glx.h>
51 #include <GL/glxext.h>
52 #include <string.h>
53 #include <stdlib.h>
54 #include <stdio.h>
55 #ifdef WIN32
56 #include <stdint.h>
57 #endif
58 #include "GL/glxint.h"
59 #include "GL/glxproto.h"
60 #include "GL/internal/glcore.h"
61 #include "glapitable.h"
62 #include "glxhash.h"
63 #if defined( USE_XTHREADS )
64 # include <X11/Xthreads.h>
65 #elif defined( PTHREADS )
66 # include <pthread.h>
67 #endif
68
69 #include "glxextensions.h"
70
71 #define GLX_MAJOR_VERSION 1 /* current version numbers */
72 #define GLX_MINOR_VERSION 4
73
74 #define __GLX_MAX_TEXTURE_UNITS 32
75
76 typedef struct __GLXscreenConfigsRec __GLXscreenConfigs;
77 typedef struct __GLXcontextRec __GLXcontext;
78 typedef struct __GLXdrawableRec __GLXdrawable;
79 typedef struct __GLXdisplayPrivateRec __GLXdisplayPrivate;
80 typedef struct _glapi_table __GLapi;
81
82 /************************************************************************/
83
84 #ifdef GLX_DIRECT_RENDERING
85
86 #define containerOf(ptr, type, member) \
87 (type *)( (char *)ptr - offsetof(type,member) )
88
89 #include <GL/internal/dri_interface.h>
90
91
92 /**
93 * Display dependent methods. This structure is initialized during the
94 * \c driCreateDisplay call.
95 */
96 typedef struct __GLXDRIdisplayRec __GLXDRIdisplay;
97 typedef struct __GLXDRIscreenRec __GLXDRIscreen;
98 typedef struct __GLXDRIdrawableRec __GLXDRIdrawable;
99 typedef struct __GLXDRIcontextRec __GLXDRIcontext;
100
101 #include "glxextensions.h"
102
103 struct __GLXDRIdisplayRec {
104 /**
105 * Method to destroy the private DRI display data.
106 */
107 void (*destroyDisplay)(__GLXDRIdisplay *display);
108
109 __GLXDRIscreen *(*createScreen)(__GLXscreenConfigs *psc, int screen,
110 __GLXdisplayPrivate *priv);
111 };
112
113 struct __GLXDRIscreenRec {
114
115 void (*destroyScreen)(__GLXscreenConfigs *psc);
116
117 __GLXDRIcontext *(*createContext)(__GLXscreenConfigs *psc,
118 const __GLcontextModes *mode,
119 GLXContext gc,
120 GLXContext shareList, int renderType);
121
122 __GLXDRIdrawable *(*createDrawable)(__GLXscreenConfigs *psc,
123 XID drawable,
124 GLXDrawable glxDrawable,
125 const __GLcontextModes *modes);
126
127 void (*swapBuffers)(__GLXDRIdrawable *pdraw);
128 };
129
130 struct __GLXDRIcontextRec {
131 void (*destroyContext)(__GLXDRIcontext *context, __GLXscreenConfigs *psc,
132 Display *dpy);
133 Bool (*bindContext)(__GLXDRIcontext *context,
134 __GLXDRIdrawable *pdraw,
135 __GLXDRIdrawable *pread);
136
137 void (*unbindContext)(__GLXDRIcontext *context);
138 };
139
140 struct __GLXDRIdrawableRec {
141 void (*destroyDrawable)(__GLXDRIdrawable *drawable);
142
143 XID xDrawable;
144 XID drawable;
145 __GLXscreenConfigs *psc;
146 GLenum textureTarget;
147 __DRIdrawable *driDrawable;
148 };
149
150 /*
151 ** Function to create and DRI display data and initialize the display
152 ** dependent methods.
153 */
154 extern __GLXDRIdisplay *driswCreateDisplay(Display *dpy);
155 extern __GLXDRIdisplay *driCreateDisplay(Display *dpy);
156 extern __GLXDRIdisplay *dri2CreateDisplay(Display *dpy);
157
158 extern void DRI_glXUseXFont( Font font, int first, int count, int listbase );
159
160 /*
161 ** Functions to obtain driver configuration information from a direct
162 ** rendering client application
163 */
164 extern const char *glXGetScreenDriver (Display *dpy, int scrNum);
165
166 extern const char *glXGetDriverConfig (const char *driverName);
167
168 #endif
169
170 /************************************************************************/
171
172 #define __GL_CLIENT_ATTRIB_STACK_DEPTH 16
173
174 typedef struct __GLXpixelStoreModeRec {
175 GLboolean swapEndian;
176 GLboolean lsbFirst;
177 GLuint rowLength;
178 GLuint imageHeight;
179 GLuint imageDepth;
180 GLuint skipRows;
181 GLuint skipPixels;
182 GLuint skipImages;
183 GLuint alignment;
184 } __GLXpixelStoreMode;
185
186
187 typedef struct __GLXattributeRec {
188 GLuint mask;
189
190 /**
191 * Pixel storage state. Most of the pixel store mode state is kept
192 * here and used by the client code to manage the packing and
193 * unpacking of data sent to/received from the server.
194 */
195 __GLXpixelStoreMode storePack, storeUnpack;
196
197 /**
198 * Is EXT_vertex_array / GL 1.1 DrawArrays protocol specifically
199 * disabled?
200 */
201 GLboolean NoDrawArraysProtocol;
202
203 /**
204 * Vertex Array storage state. The vertex array component
205 * state is stored here and is used to manage the packing of
206 * DrawArrays data sent to the server.
207 */
208 struct array_state_vector * array_state;
209 } __GLXattribute;
210
211 typedef struct __GLXattributeMachineRec {
212 __GLXattribute *stack[__GL_CLIENT_ATTRIB_STACK_DEPTH];
213 __GLXattribute **stackPointer;
214 } __GLXattributeMachine;
215
216 /**
217 * GLX state that needs to be kept on the client. One of these records
218 * exist for each context that has been made current by this client.
219 */
220 struct __GLXcontextRec {
221 /**
222 * \name Drawing command buffer.
223 *
224 * Drawing commands are packed into this buffer before being sent as a
225 * single GLX protocol request. The buffer is sent when it overflows or
226 * is flushed by \c __glXFlushRenderBuffer. \c pc is the next location
227 * in the buffer to be filled. \c limit is described above in the buffer
228 * slop discussion.
229 *
230 * Commands that require large amounts of data to be transfered will
231 * also use this buffer to hold a header that describes the large
232 * command.
233 *
234 * These must be the first 6 fields since they are static initialized
235 * in the dummy context in glxext.c
236 */
237 /*@{*/
238 GLubyte *buf;
239 GLubyte *pc;
240 GLubyte *limit;
241 GLubyte *bufEnd;
242 GLint bufSize;
243 /*@}*/
244
245 /**
246 * The XID of this rendering context. When the context is created a
247 * new XID is allocated. This is set to None when the context is
248 * destroyed but is still current to some thread. In this case the
249 * context will be freed on next MakeCurrent.
250 */
251 XID xid;
252
253 /**
254 * The XID of the \c shareList context.
255 */
256 XID share_xid;
257
258 /**
259 * Screen number.
260 */
261 GLint screen;
262 __GLXscreenConfigs *psc;
263
264 /**
265 * \c GL_TRUE if the context was created with ImportContext, which
266 * means the server-side context was created by another X client.
267 */
268 GLboolean imported;
269
270 /**
271 * The context tag returned by MakeCurrent when this context is made
272 * current. This tag is used to identify the context that a thread has
273 * current so that proper server context management can be done. It is
274 * used for all context specific commands (i.e., \c Render, \c RenderLarge,
275 * \c WaitX, \c WaitGL, \c UseXFont, and \c MakeCurrent (for the old
276 * context)).
277 */
278 GLXContextTag currentContextTag;
279
280 /**
281 * \name Rendering mode
282 *
283 * The rendering mode is kept on the client as well as the server.
284 * When \c glRenderMode is called, the buffer associated with the
285 * previous rendering mode (feedback or select) is filled.
286 */
287 /*@{*/
288 GLenum renderMode;
289 GLfloat *feedbackBuf;
290 GLuint *selectBuf;
291 /*@}*/
292
293 /**
294 * This is \c GL_TRUE if the pixel unpack modes are such that an image
295 * can be unpacked from the clients memory by just copying. It may
296 * still be true that the server will have to do some work. This
297 * just promises that a straight copy will fetch the correct bytes.
298 */
299 GLboolean fastImageUnpack;
300
301 /**
302 * Fill newImage with the unpacked form of \c oldImage getting it
303 * ready for transport to the server.
304 */
305 void (*fillImage)(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,
306 GLenum, const GLvoid*, GLubyte*, GLubyte*);
307
308 /**
309 * Client side attribs.
310 */
311 __GLXattributeMachine attributes;
312
313 /**
314 * Client side error code. This is set when client side gl API
315 * routines need to set an error because of a bad enumerant or
316 * running out of memory, etc.
317 */
318 GLenum error;
319
320 /**
321 * Whether this context does direct rendering.
322 */
323 Bool isDirect;
324
325 /**
326 * \c dpy of current display for this context. Will be \c NULL if not
327 * current to any display, or if this is the "dummy context".
328 */
329 Display *currentDpy;
330
331 /**
332 * The current drawable for this context. Will be None if this
333 * context is not current to any drawable. currentReadable is below.
334 */
335 GLXDrawable currentDrawable;
336
337 /**
338 * \name GL Constant Strings
339 *
340 * Constant strings that describe the server implementation
341 * These pertain to GL attributes, not to be confused with
342 * GLX versioning attributes.
343 */
344 /*@{*/
345 GLubyte *vendor;
346 GLubyte *renderer;
347 GLubyte *version;
348 GLubyte *extensions;
349 /*@}*/
350
351 /**
352 * Record the dpy this context was created on for later freeing
353 */
354 Display *createDpy;
355
356 /**
357 * Maximum small render command size. This is the smaller of 64k and
358 * the size of the above buffer.
359 */
360 GLint maxSmallRenderCommandSize;
361
362 /**
363 * Major opcode for the extension. Copied here so a lookup isn't
364 * needed.
365 */
366 GLint majorOpcode;
367
368 /**
369 * Pointer to the mode used to create this context.
370 */
371 const __GLcontextModes * mode;
372
373 #ifdef GLX_DIRECT_RENDERING
374 __GLXDRIcontext *driContext;
375 __DRIcontext *__driContext;
376 #endif
377
378 /**
379 * The current read-drawable for this context. Will be None if this
380 * context is not current to any drawable.
381 *
382 * \since Internal API version 20030606.
383 */
384 GLXDrawable currentReadable;
385
386 /**
387 * Pointer to client-state data that is private to libGL. This is only
388 * used for indirect rendering contexts.
389 *
390 * No internal API version change was made for this change. Client-side
391 * drivers should NEVER use this data or even care that it exists.
392 */
393 void * client_state_private;
394
395 /**
396 * Stored value for \c glXQueryContext attribute \c GLX_RENDER_TYPE.
397 */
398 int renderType;
399
400 /**
401 * \name Raw server GL version
402 *
403 * True core GL version supported by the server. This is the raw value
404 * returned by the server, and it may not reflect what is actually
405 * supported (or reported) by the client-side library.
406 */
407 /*@{*/
408 int server_major; /**< Major version number. */
409 int server_minor; /**< Minor version number. */
410 /*@}*/
411
412 char gl_extension_bits[ __GL_EXT_BYTES ];
413 };
414
415 #define __glXSetError(gc,code) \
416 if (!(gc)->error) { \
417 (gc)->error = code; \
418 }
419
420 extern void __glFreeAttributeState(__GLXcontext *);
421
422 /************************************************************************/
423
424 /**
425 * The size of the largest drawing command known to the implementation
426 * that will use the GLXRender GLX command. In this case it is
427 * \c glPolygonStipple.
428 */
429 #define __GLX_MAX_SMALL_RENDER_CMD_SIZE 156
430
431 /**
432 * To keep the implementation fast, the code uses a "limit" pointer
433 * to determine when the drawing command buffer is too full to hold
434 * another fixed size command. This constant defines the amount of
435 * space that must always be available in the drawing command buffer
436 * at all times for the implementation to work. It is important that
437 * the number be just large enough, but not so large as to reduce the
438 * efficacy of the buffer. The "+32" is just to keep the code working
439 * in case somebody counts wrong.
440 */
441 #define __GLX_BUFFER_LIMIT_SIZE (__GLX_MAX_SMALL_RENDER_CMD_SIZE + 32)
442
443 /**
444 * This implementation uses a smaller threshold for switching
445 * to the RenderLarge protocol than the protcol requires so that
446 * large copies don't occur.
447 */
448 #define __GLX_RENDER_CMD_SIZE_LIMIT 4096
449
450 /**
451 * One of these records exists per screen of the display. It contains
452 * a pointer to the config data for that screen (if the screen supports GL).
453 */
454 struct __GLXscreenConfigsRec {
455 /**
456 * GLX extension string reported by the X-server.
457 */
458 const char *serverGLXexts;
459
460 /**
461 * GLX extension string to be reported to applications. This is the
462 * set of extensions that the application can actually use.
463 */
464 char *effectiveGLXexts;
465
466 #ifdef GLX_DIRECT_RENDERING
467 /**
468 * Per screen direct rendering interface functions and data.
469 */
470 __DRIscreen *__driScreen;
471 const __DRIcoreExtension *core;
472 const __DRIlegacyExtension *legacy;
473 const __DRIswrastExtension *swrast;
474 const __DRIdri2Extension *dri2;
475 __glxHashTable *drawHash;
476 Display *dpy;
477 int scr, fd;
478 void *driver;
479
480 __GLXDRIscreen *driScreen;
481
482 #ifdef __DRI_COPY_SUB_BUFFER
483 const __DRIcopySubBufferExtension *copySubBuffer;
484 #endif
485
486 #ifdef __DRI_SWAP_CONTROL
487 const __DRIswapControlExtension *swapControl;
488 #endif
489
490 #ifdef __DRI_ALLOCATE
491 const __DRIallocateExtension *allocate;
492 #endif
493
494 #ifdef __DRI_FRAME_TRACKING
495 const __DRIframeTrackingExtension *frameTracking;
496 #endif
497
498 #ifdef __DRI_MEDIA_STREAM_COUNTER
499 const __DRImediaStreamCounterExtension *msc;
500 #endif
501
502 #ifdef __DRI_TEX_BUFFER
503 const __DRItexBufferExtension *texBuffer;
504 #endif
505
506 #endif
507
508 /**
509 * Linked list of glx visuals and fbconfigs for this screen.
510 */
511 __GLcontextModes *visuals, *configs;
512
513 /**
514 * Per-screen dynamic GLX extension tracking. The \c direct_support
515 * field only contains enough bits for 64 extensions. Should libGL
516 * ever need to track more than 64 GLX extensions, we can safely grow
517 * this field. The \c __GLXscreenConfigs structure is not used outside
518 * libGL.
519 */
520 /*@{*/
521 unsigned char direct_support[8];
522 GLboolean ext_list_first_time;
523 /*@}*/
524
525 };
526
527 /**
528 * Per display private data. One of these records exists for each display
529 * that is using the OpenGL (GLX) extension.
530 */
531 struct __GLXdisplayPrivateRec {
532 /**
533 * Back pointer to the display
534 */
535 Display *dpy;
536
537 /**
538 * The \c majorOpcode is common to all connections to the same server.
539 * It is also copied into the context structure.
540 */
541 int majorOpcode;
542
543 /**
544 * \name Server Version
545 *
546 * Major and minor version returned by the server during initialization.
547 */
548 /*@{*/
549 int majorVersion, minorVersion;
550 /*@}*/
551
552 /**
553 * \name Storage for the servers GLX vendor and versions strings.
554 *
555 * These are the same for all screens on this display. These fields will
556 * be filled in on demand.
557 */
558 /*@{*/
559 const char *serverGLXvendor;
560 const char *serverGLXversion;
561 /*@}*/
562
563 /**
564 * Configurations of visuals for all screens on this display.
565 * Also, per screen data which now includes the server \c GLX_EXTENSION
566 * string.
567 */
568 __GLXscreenConfigs *screenConfigs;
569
570 #ifdef GLX_DIRECT_RENDERING
571 /**
572 * Per display direct rendering interface functions and data.
573 */
574 __GLXDRIdisplay *driswDisplay;
575 __GLXDRIdisplay *driDisplay;
576 __GLXDRIdisplay *dri2Display;
577 #endif
578 };
579
580
581 extern GLubyte *__glXFlushRenderBuffer(__GLXcontext*, GLubyte*);
582
583 extern void __glXSendLargeChunk(__GLXcontext *gc, GLint requestNumber,
584 GLint totalRequests,
585 const GLvoid * data, GLint dataLen);
586
587 extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint,
588 const GLvoid *, GLint);
589
590 /* Initialize the GLX extension for dpy */
591 extern __GLXdisplayPrivate *__glXInitialize(Display*);
592
593 /************************************************************************/
594
595 extern int __glXDebug;
596
597 /* This is per-thread storage in an MT environment */
598 #if defined( USE_XTHREADS ) || defined( PTHREADS )
599
600 extern void __glXSetCurrentContext(__GLXcontext *c);
601
602 # if defined( GLX_USE_TLS )
603
604 extern __thread void * __glX_tls_Context
605 __attribute__((tls_model("initial-exec")));
606
607 # define __glXGetCurrentContext() __glX_tls_Context
608
609 # else
610
611 extern __GLXcontext *__glXGetCurrentContext(void);
612
613 # endif /* defined( GLX_USE_TLS ) */
614
615 #else
616
617 extern __GLXcontext *__glXcurrentContext;
618 #define __glXGetCurrentContext() __glXcurrentContext
619 #define __glXSetCurrentContext(gc) __glXcurrentContext = gc
620
621 #endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) */
622
623 extern void __glXSetCurrentContextNull(void);
624
625 extern void __glXFreeContext(__GLXcontext*);
626
627
628 /*
629 ** Global lock for all threads in this address space using the GLX
630 ** extension
631 */
632 #if defined( USE_XTHREADS )
633 extern xmutex_rec __glXmutex;
634 #define __glXLock() xmutex_lock(&__glXmutex)
635 #define __glXUnlock() xmutex_unlock(&__glXmutex)
636 #elif defined( PTHREADS )
637 extern pthread_mutex_t __glXmutex;
638 #define __glXLock() pthread_mutex_lock(&__glXmutex)
639 #define __glXUnlock() pthread_mutex_unlock(&__glXmutex)
640 #else
641 #define __glXLock()
642 #define __glXUnlock()
643 #endif
644
645 /*
646 ** Setup for a command. Initialize the extension for dpy if necessary.
647 */
648 extern CARD8 __glXSetupForCommand(Display *dpy);
649
650 /************************************************************************/
651
652 /*
653 ** Data conversion and packing support.
654 */
655
656 extern const GLuint __glXDefaultPixelStore[9];
657
658 /* Send an image to the server using RenderLarge. */
659 extern void __glXSendLargeImage(__GLXcontext *gc, GLint compsize, GLint dim,
660 GLint width, GLint height, GLint depth, GLenum format, GLenum type,
661 const GLvoid *src, GLubyte *pc, GLubyte *modes);
662
663 /* Return the size, in bytes, of some pixel data */
664 extern GLint __glImageSize(GLint, GLint, GLint, GLenum, GLenum, GLenum);
665
666 /* Return the number of elements per group of a specified format*/
667 extern GLint __glElementsPerGroup(GLenum format, GLenum type);
668
669 /* Return the number of bytes per element, based on the element type (other
670 ** than GL_BITMAP).
671 */
672 extern GLint __glBytesPerElement(GLenum type);
673
674 /*
675 ** Fill the transport buffer with the data from the users buffer,
676 ** applying some of the pixel store modes (unpack modes) to the data
677 ** first. As a side effect of this call, the "modes" field is
678 ** updated to contain the modes needed by the server to decode the
679 ** sent data.
680 */
681 extern void __glFillImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,
682 GLenum, const GLvoid*, GLubyte*, GLubyte*);
683
684 /* Copy map data with a stride into a packed buffer */
685 extern void __glFillMap1f(GLint, GLint, GLint, const GLfloat *, GLubyte *);
686 extern void __glFillMap1d(GLint, GLint, GLint, const GLdouble *, GLubyte *);
687 extern void __glFillMap2f(GLint, GLint, GLint, GLint, GLint,
688 const GLfloat *, GLfloat *);
689 extern void __glFillMap2d(GLint, GLint, GLint, GLint, GLint,
690 const GLdouble *, GLdouble *);
691
692 /*
693 ** Empty an image out of the reply buffer into the clients memory applying
694 ** the pack modes to pack back into the clients requested format.
695 */
696 extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,
697 GLenum, const GLubyte *, GLvoid *);
698
699
700 /*
701 ** Allocate and Initialize Vertex Array client state, and free.
702 */
703 extern void __glXInitVertexArrayState(__GLXcontext *);
704 extern void __glXFreeVertexArrayState(__GLXcontext *);
705
706 /*
707 ** Inform the Server of the major and minor numbers and of the client
708 ** libraries extension string.
709 */
710 extern void __glXClientInfo ( Display *dpy, int opcode );
711
712 /************************************************************************/
713
714 /*
715 ** Declarations that should be in Xlib
716 */
717 #ifdef __GL_USE_OUR_PROTOTYPES
718 extern void _XFlush(Display*);
719 extern Status _XReply(Display*, xReply*, int, Bool);
720 extern void _XRead(Display*, void*, long);
721 extern void _XSend(Display*, const void*, long);
722 #endif
723
724
725 extern void __glXInitializeVisualConfigFromTags( __GLcontextModes *config,
726 int count, const INT32 *bp, Bool tagged_only, Bool fbconfig_style_tags );
727
728 extern char * __glXGetStringFromServer( Display * dpy, int opcode,
729 CARD32 glxCode, CARD32 for_whom, CARD32 name );
730
731 extern char *__glXstrdup(const char *str);
732
733
734 extern const char __glXGLClientVersion[];
735 extern const char __glXGLClientExtensions[];
736
737 /* Get the unadjusted system time */
738 extern int __glXGetUST( int64_t * ust );
739
740 extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
741 int32_t * numerator, int32_t * denominator);
742
743 #ifdef GLX_DIRECT_RENDERING
744 GLboolean
745 __driGetMscRateOML(__DRIdrawable *draw,
746 int32_t *numerator, int32_t *denominator, void *private);
747 #endif
748
749 #endif /* !__GLX_client_h__ */