added some missing NV token values
[mesa.git] / include / GL / glx.h
index e98f9cb8e7440456bbd494ed7832167c02b984c9..e9f8cbf50f58fe2ec95079fafb98282c69072041 100644 (file)
@@ -1,10 +1,10 @@
-/* $Id: glx.h,v 1.8 1999/11/23 19:54:53 brianp Exp $ */
+/* $Id: glx.h,v 1.19 2000/04/10 21:12:20 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
  * Version:  3.3
  * 
- * Copyright (C) 1999  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
 #define GLX_H
 
 
+#ifdef __VMS
+# ifdef __cplusplus
+/* VMS Xlib.h gives problems with C++.
+ * this avoids a bunch of trivial warnings */
+#pragma message disable nosimpint
+#endif
+#endif
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
-#include "GL/gl.h"
-#ifdef MESA
-#include "GL/xmesa.h"
+#ifdef __VMS
+# ifdef __cplusplus
+#pragma message enable nosimpint
+#endif
 #endif
+#include "GL/gl.h"
 
 
 #if defined(USE_MGL_NAMESPACE)
@@ -50,7 +59,6 @@ extern "C" {
 
 #define GLX_VERSION_1_1                1
 #define GLX_VERSION_1_2                1
-#define GLX_VERSION_1_3                1
 
 #define GLX_EXTENSION_NAME   "GLX"
 
@@ -103,10 +111,10 @@ extern "C" {
  * XXX don't know the values of some of these enums!
  * XXX some 1.3 enums may be missing!
  */
-#define GLX_CONFIG_CAVEAT              ?
-#define GLX_DONT_CARE                  ?
-#define GLX_SLOW_CONFIG                        ?
-#define GLX_NON_CONFORMANT_CONFIG      ?
+#define GLX_CONFIG_CAVEAT              0x20
+#define GLX_DONT_CARE                  0xFFFFFFFF
+#define GLX_SLOW_CONFIG                        0x8001
+#define GLX_NON_CONFORMANT_CONFIG      0x800D
 #define GLX_X_VISUAL_TYPE              0x22
 #define GLX_TRANSPARENT_TYPE           0x23
 #define GLX_TRANSPARENT_INDEX_VALUE    0x24
@@ -114,28 +122,29 @@ extern "C" {
 #define GLX_TRANSPARENT_GREEN_VALUE    0x26
 #define GLX_TRANSPARENT_BLUE_VALUE     0x27
 #define GLX_TRANSPARENT_ALPHA_VALUE    0x28
-#define GLX_MAX_PBUFFER_WIDTH          ?
-#define GLX_MAX_PBUFFER_HEIGHT         ?
-#define GLX_MAX_PBUFFER_PIXELS         ?
-#define GLX_PRESERVED_CONTENTS         ?
-#define GLX_LARGEST_BUFFER             ?
-#define GLX_DRAWABLE_TYPE              ?
-#define GLX_FBCONFIG_ID                        ?
-#define GLX_VISUAL_ID                  ?
-#define GLX_WINDOW_BIT                 ?
-#define GLX_PBUFFER_BIT                        ?
-#define GLX_AUX_BUFFERS_BIT            ?
-#define GLX_FRONT_LEFT_BUFFER_BIT      ?
-#define GLX_FRONT_RIGHT_BUFFER_BIT     ?
-#define GLX_BACK_LEFT_BUFFER_BIT       ?
-#define GLX_BACK_RIGHT_BUFFER_BIT      ?
-#define GLX_AUX_BUFFERS_BIT            ?
-#define GLX_DEPTH_BUFFER_BIT           ?
-#define GLX_STENCIL_BUFFER_BIT         ?
-#define GLX_ACCUM_BUFFER_BIT           ?
-#define GLX_RENDER_TYPE                        ?
-#define GLX_DRAWABLE_TYPE              ?
-#define GLX_X_RENDERABLE               ?
+#define GLX_MAX_PBUFFER_WIDTH          0x8016
+#define GLX_MAX_PBUFFER_HEIGHT         0x8017
+#define GLX_MAX_PBUFFER_PIXELS         0x8018
+#define GLX_PRESERVED_CONTENTS         0x801B
+#define GLX_LARGEST_BUFFER             0x801C
+#define GLX_DRAWABLE_TYPE              0x8010
+#define GLX_FBCONFIG_ID                        0x8013
+#define GLX_VISUAL_ID                  0x800B
+#define GLX_WINDOW_BIT                 0x00000001
+#define GLX_PIXMAP_BIT                 0x00000002
+#define GLX_PBUFFER_BIT                        0x00000004
+#define GLX_AUX_BUFFERS_BIT            0x00000010
+#define GLX_FRONT_LEFT_BUFFER_BIT      0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT     0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT       0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT      0x00000008
+#define GLX_AUX_BUFFERS_BIT            0x00000010
+#define GLX_DEPTH_BUFFER_BIT           0x00000020
+#define GLX_STENCIL_BUFFER_BIT         0x00000040
+#define GLX_ACCUM_BUFFER_BIT           0x00000080
+#define GLX_DRAWABLE_TYPE              0x8010
+#define GLX_RENDER_TYPE                        0x8011
+#define GLX_X_RENDERABLE               0x8012
 #define GLX_NONE                       0x8000
 #define GLX_TRUE_COLOR                 0x8002
 #define GLX_DIRECT_COLOR               0x8003
@@ -144,17 +153,18 @@ extern "C" {
 #define GLX_GRAY_SCALE                 0x8006
 #define GLX_STATIC_GRAY                        0x8007
 #define GLX_TRANSPARENT_INDEX          0x8009
-#define GLX_COLOR_INDEX_TYPE           ?
-#define GLX_SCREEN                     ?
-#define GLX_PBUFFER_CLOBBER_MASK       ?
-#define GLX_DAMAGED                    ?
-#define GLX_SAVED                      ?
-#define GLX_WINDOW                     ?
-#define GLX_PBUFFER                    ?
+#define GLX_COLOR_INDEX_TYPE           0x8015
+#define GLX_COLOR_INDEX_BIT            0x00000002
+#define GLX_SCREEN                     0x800C
+#define GLX_PBUFFER_CLOBBER_MASK       0x08000000
+#define GLX_DAMAGED                    0x8020
+#define GLX_SAVED                      0x8021
+#define GLX_WINDOW                     0x8022
+#define GLX_PBUFFER                    0x8033
 
 
 /*
- * GLX_EXT_visual_info extension
+ * 28. GLX_EXT_visual_info extension
  */
 #define GLX_X_VISUAL_TYPE_EXT          0x22
 #define GLX_TRANSPARENT_TYPE_EXT       0x23
@@ -163,11 +173,6 @@ extern "C" {
 #define GLX_TRANSPARENT_GREEN_VALUE_EXT        0x26
 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT        0x28
-
-
-/*
- * GLX_visual_info extension
- */
 #define GLX_TRUE_COLOR_EXT             0x8002
 #define GLX_DIRECT_COLOR_EXT           0x8003
 #define GLX_PSEUDO_COLOR_EXT           0x8004
@@ -179,16 +184,26 @@ extern "C" {
 #define GLX_TRANSPARENT_INDEX_EXT      0x8009
 
 
+/*
+ * 42. GLX_EXT_visual_rating
+ */
+#define GLX_VISUAL_CAVEAT_EXT          0x20
+/*#define GLX_NONE_EXT                 0x8000*/
+#define GLX_SLOW_VISUAL_EXT            0x8001
+#define GLX_NON_CONFORMANT_VISUAL_EXT  0x800D
+
+
 /*
  * Compile-time extension tests
  */
 #define GLX_EXT_visual_info            1
-#define GLX_EXT_get_proc_address       1
+#define GLX_EXT_visual_rating          1
 #define GLX_MESA_pixmap_colormap       1
 #define GLX_MESA_release_buffers       1
 #define GLX_MESA_copy_sub_buffer       1
 #define GLX_MESA_set_3dfx_mode         1
 #define GLX_SGI_video_sync             1
+#define GLX_ARB_get_proc_address       1
 
 
 
@@ -223,7 +238,7 @@ extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
                            GLXContext ctx);
 
 extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
-                           GLuint mask );
+                           unsigned long mask );
 
 extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
 
@@ -266,12 +281,15 @@ extern Display *glXGetCurrentDisplay( void );
 
 
 /* GLX 1.3 and later */
-extern GLXFBConfig glXChooseFBConfig( Display *dpy, int screen,
-                                      const int *attribList, int *nitems );
+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
+                                       const int *attribList, int *nitems );
 
 extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
                                  int attribute, int *value );
 
+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
+                                     int *nelements );
+
 extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
                                               GLXFBConfig config );
 
@@ -337,6 +355,10 @@ extern int glXWaitVideoSyncSGI(int divisor, int remainder,
                                unsigned int *count);
 
 
+/* GLX_ARB_get_proc_address */
+extern void (*glXGetProcAddressARB(const GLubyte *procName))();
+
+
 
 #ifdef __cplusplus
 }