Merge branch 'radeon-rewrite' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa...
[mesa.git] / include / GL / gl.h
index aca62af39bfd5321f595fe31498e2e2147b5c79d..aad51214fbeae31ea795adc75c2746d8c2c7c416 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
+ * Version:  7.5
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
 #  else /* for use with static link lib build of Win32 edition only */
 #    define GLAPI extern
 #  endif /* _STATIC_MESA support */
-#  define GLAPIENTRY __stdcall
+#  if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE)  /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
+#    define GLAPIENTRY 
+#  else
+#    define GLAPIENTRY __stdcall
+#  endif
 #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
 #  define GLAPI extern
 #  define GLAPIENTRY __stdcall
@@ -84,7 +88,9 @@
 #include <windows.h>
 #endif
 
-#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_WIN32_WCE) \
+     && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) \
+     && !defined(__CYGWIN__) || defined(__MINGW32__)
 #include <GL/mesa_wgl.h>
 #endif
 
@@ -441,16 +447,16 @@ typedef double            GLclampd;       /* double precision float in [0,1] */
 #define GL_OR_INVERTED                         0x150D
 
 /* Stencil */
-#define GL_STENCIL_TEST                                0x0B90
-#define GL_STENCIL_WRITEMASK                   0x0B98
 #define GL_STENCIL_BITS                                0x0D57
+#define GL_STENCIL_TEST                                0x0B90
+#define GL_STENCIL_CLEAR_VALUE                 0x0B91
 #define GL_STENCIL_FUNC                                0x0B92
 #define GL_STENCIL_VALUE_MASK                  0x0B93
-#define GL_STENCIL_REF                         0x0B97
 #define GL_STENCIL_FAIL                                0x0B94
-#define GL_STENCIL_PASS_DEPTH_PASS             0x0B96
 #define GL_STENCIL_PASS_DEPTH_FAIL             0x0B95
-#define GL_STENCIL_CLEAR_VALUE                 0x0B91
+#define GL_STENCIL_PASS_DEPTH_PASS             0x0B96
+#define GL_STENCIL_REF                         0x0B97
+#define GL_STENCIL_WRITEMASK                   0x0B98
 #define GL_STENCIL_INDEX                       0x1901
 #define GL_KEEP                                        0x1E00
 #define GL_REPLACE                             0x1E01
@@ -500,16 +506,16 @@ typedef double            GLclampd;       /* double precision float in [0,1] */
 
 /* Implementation limits */
 #define GL_MAX_LIST_NESTING                    0x0B31
-#define GL_MAX_ATTRIB_STACK_DEPTH              0x0D35
-#define GL_MAX_MODELVIEW_STACK_DEPTH           0x0D36
-#define GL_MAX_NAME_STACK_DEPTH                        0x0D37
-#define GL_MAX_PROJECTION_STACK_DEPTH          0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH             0x0D39
 #define GL_MAX_EVAL_ORDER                      0x0D30
 #define GL_MAX_LIGHTS                          0x0D31
 #define GL_MAX_CLIP_PLANES                     0x0D32
 #define GL_MAX_TEXTURE_SIZE                    0x0D33
 #define GL_MAX_PIXEL_MAP_TABLE                 0x0D34
+#define GL_MAX_ATTRIB_STACK_DEPTH              0x0D35
+#define GL_MAX_MODELVIEW_STACK_DEPTH           0x0D36
+#define GL_MAX_NAME_STACK_DEPTH                        0x0D37
+#define GL_MAX_PROJECTION_STACK_DEPTH          0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH             0x0D39
 #define GL_MAX_VIEWPORT_DIMS                   0x0D3A
 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH       0x0D3B
 
@@ -567,22 +573,22 @@ typedef double            GLclampd;       /* double precision float in [0,1] */
 #define GL_MAP2_GRID_DOMAIN                    0x0DD2
 #define GL_MAP2_GRID_SEGMENTS                  0x0DD3
 #define GL_COEFF                               0x0A00
-#define GL_DOMAIN                              0x0A02
 #define GL_ORDER                               0x0A01
+#define GL_DOMAIN                              0x0A02
 
 /* Hints */
-#define GL_FOG_HINT                            0x0C54
-#define GL_LINE_SMOOTH_HINT                    0x0C52
 #define GL_PERSPECTIVE_CORRECTION_HINT         0x0C50
 #define GL_POINT_SMOOTH_HINT                   0x0C51
+#define GL_LINE_SMOOTH_HINT                    0x0C52
 #define GL_POLYGON_SMOOTH_HINT                 0x0C53
+#define GL_FOG_HINT                            0x0C54
 #define GL_DONT_CARE                           0x1100
 #define GL_FASTEST                             0x1101
 #define GL_NICEST                              0x1102
 
 /* Scissor box */
-#define GL_SCISSOR_TEST                                0x0C11
 #define GL_SCISSOR_BOX                         0x0C10
+#define GL_SCISSOR_TEST                                0x0C11
 
 /* Pixel Mode / Transfer */
 #define GL_MAP_COLOR                           0x0D10
@@ -687,8 +693,8 @@ typedef double              GLclampd;       /* double precision float in [0,1] */
 
 /* Errors */
 #define GL_NO_ERROR                            0x0
-#define GL_INVALID_VALUE                       0x0501
 #define GL_INVALID_ENUM                                0x0500
+#define GL_INVALID_VALUE                       0x0501
 #define GL_INVALID_OPERATION                   0x0502
 #define GL_STACK_OVERFLOW                      0x0503
 #define GL_STACK_UNDERFLOW                     0x0504
@@ -2152,35 +2158,24 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
 
 
 
-/*
- * ???. GL_MESA_trace
- * XXX obsolete
- */
-#ifndef GL_MESA_trace
-#define GL_MESA_trace 1
-
-#define GL_TRACE_ALL_BITS_MESA                 0xFFFF
-#define GL_TRACE_OPERATIONS_BIT_MESA           0x0001
-#define GL_TRACE_PRIMITIVES_BIT_MESA           0x0002
-#define GL_TRACE_ARRAYS_BIT_MESA               0x0004
-#define GL_TRACE_TEXTURES_BIT_MESA             0x0008
-#define GL_TRACE_PIXELS_BIT_MESA               0x0010
-#define GL_TRACE_ERRORS_BIT_MESA               0x0020
-#define GL_TRACE_MASK_MESA                     0x8755
-#define GL_TRACE_NAME_MESA                     0x8756
-
-GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask );
-GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask );
-GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName );
-GLAPI void GLAPIENTRY glEndTraceMESA( void );
-GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask );
-GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment );
-GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment );
-GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment );
-GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment );
-GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment );
-
-#endif /* GL_MESA_trace */
+#if GL_ARB_shader_objects
+
+#ifndef GL_MESA_shader_debug
+#define GL_MESA_shader_debug 1
+
+#define GL_DEBUG_OBJECT_MESA              0x8759
+#define GL_DEBUG_PRINT_MESA               0x875A
+#define GL_DEBUG_ASSERT_MESA              0x875B
+
+GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
+GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
+                                         GLsizei *length, GLcharARB *debugLog);
+GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+
+#endif /* GL_MESA_shader_debug */
+
+#endif /* GL_ARB_shader_objects */
 
 
 /*
@@ -2220,77 +2215,49 @@ GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, con
 #endif /* GL_MESA_program_debug */
 
 
-#ifndef GL_ATI_blend_equation_separate
-#define GL_ATI_blend_equation_separate 1
-
-#define GL_ALPHA_BLEND_EQUATION_ATI            0x883D
-
-GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
-typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
-
-#endif /* GL_ATI_blend_equation_separate */
-
+#ifndef GL_MESA_texture_array
+#define GL_MESA_texture_array 1
 
+/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
+ */
+#ifndef GL_EXT_texture_array
 
-#ifndef GL_EXT_timer_query
-#define GL_EXT_timer_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
+    GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif /* GL_GLEXT_PROTOTYPES */
 
-/* Define 64-bit types */
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-   typedef long long int GLint64EXT;
-   typedef unsigned long long int GLuint64EXT;
-#elif defined(_WIN32)
-   typedef __int64 GLint64EXT;
-   typedef unsigned __int64 GLuint64EXT;
-#else
-   /* this might actually be a 32-bit type */
-   typedef long int GLint64EXT;
-   typedef unsigned long int GLuint64EXT;
+#if 0
+/* (temporarily) disabled because of collision with typedef in glext.h
+ * that happens if apps include both gl.h and glext.h
+ */
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
+    GLenum attachment, GLuint texture, GLint level, GLint layer);
 #endif
 
-#define GL_TIME_ELAPSED_EXT  0x88BF
-
-GLAPI void GLAPIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
-GLAPI void GLAPIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
-
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
-
-#endif /* GL_EXT_timer_query */
-
-
-
-#ifndef GL_EXT_framebuffer_blit
-#define GL_EXT_framebuffer_blit 1
-
-#define GL_READ_FRAMEBUFFER_EXT                0x8CA8
-#define GL_DRAW_FRAMEBUFFER_EXT                0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_EXT        0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_EXT        0x8CAA
-
-GLAPI void GLAPIENTRY
-glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
-                     GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
-                     GLbitfield mask, GLenum filter);
+#define GL_TEXTURE_1D_ARRAY_EXT         0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT   0x8C19
+#define GL_TEXTURE_2D_ARRAY_EXT         0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT   0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+#endif
 
-typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC)
-        (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
-         GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
-         GLbitfield mask, GLenum filter);
+#endif
 
-#endif /* GL_EXT_framebuffer_blit */
 
+#ifndef GL_ATI_blend_equation_separate
+#define GL_ATI_blend_equation_separate 1
 
+#define GL_ALPHA_BLEND_EQUATION_ATI            0x883D
 
-#ifndef GL_EXT_packed_depth_stencil
-#define GL_EXT_packed_depth_stencil 1
+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
 
-#define GL_DEPTH_STENCIL_EXT          0x84F9
-#define GL_UNSIGNED_INT_24_8_EXT      0x84FA
-#define GL_DEPTH24_STENCIL8_EXT       0x88F0
-#define GL_TEXTURE_STENCIL_SIZE_EXT   0x88F1
+#endif /* GL_ATI_blend_equation_separate */
 
-#endif /* GL_EXT_packed_depth_stencil */
 
 
 /**