1 /* 2 ** Copyright (c) 2013-2015 The Khronos Group Inc. 3 ** 4 ** Permission is hereby granted, free of charge, to any person obtaining a 5 ** copy of this software and/or associated documentation files (the 6 ** "Materials"), to deal in the Materials without restriction, including 7 ** without limitation the rights to use, copy, modify, merge, publish, 8 ** distribute, sublicense, and/or sell copies of the Materials, and to 9 ** permit persons to whom the Materials are furnished to do so, subject to 10 ** the following conditions: 11 ** 12 ** The above copyright notice and this permission notice shall be included 13 ** in all copies or substantial portions of the Materials. 14 ** 15 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 22 */ 23 24 #include "Common/GL/GLExtensions/gl_common.h" 25 26 #define GL_BLEND_DST_RGB 0x80C8 27 #define GL_BLEND_SRC_RGB 0x80C9 28 #define GL_BLEND_DST_ALPHA 0x80CA 29 #define GL_BLEND_SRC_ALPHA 0x80CB 30 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 31 #define GL_DEPTH_COMPONENT16 0x81A5 32 #define GL_DEPTH_COMPONENT24 0x81A6 33 #define GL_DEPTH_COMPONENT32 0x81A7 34 #define GL_MIRRORED_REPEAT 0x8370 35 #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD 36 #define GL_TEXTURE_LOD_BIAS 0x8501 37 #define GL_INCR_WRAP 0x8507 38 #define GL_DECR_WRAP 0x8508 39 #define GL_TEXTURE_DEPTH_SIZE 0x884A 40 #define GL_TEXTURE_COMPARE_MODE 0x884C 41 #define GL_TEXTURE_COMPARE_FUNC 0x884D 42 #define GL_POINT_SIZE_MIN 0x8126 43 #define GL_POINT_SIZE_MAX 0x8127 44 #define GL_POINT_DISTANCE_ATTENUATION 0x8129 45 #define GL_GENERATE_MIPMAP 0x8191 46 #define GL_GENERATE_MIPMAP_HINT 0x8192 47 #define GL_FOG_COORDINATE_SOURCE 0x8450 48 #define GL_FOG_COORDINATE 0x8451 49 #define GL_FRAGMENT_DEPTH 0x8452 50 #define GL_CURRENT_FOG_COORDINATE 0x8453 51 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 52 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 53 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 54 #define GL_FOG_COORDINATE_ARRAY 0x8457 55 #define GL_COLOR_SUM 0x8458 56 #define GL_CURRENT_SECONDARY_COLOR 0x8459 57 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A 58 #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B 59 #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C 60 #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D 61 #define GL_SECONDARY_COLOR_ARRAY 0x845E 62 #define GL_TEXTURE_FILTER_CONTROL 0x8500 63 #define GL_DEPTH_TEXTURE_MODE 0x884B 64 #define GL_COMPARE_R_TO_TEXTURE 0x884E 65 #define GL_FUNC_ADD 0x8006 66 #define GL_FUNC_SUBTRACT 0x800A 67 #define GL_FUNC_REVERSE_SUBTRACT 0x800B 68 #define GL_MIN 0x8007 69 #define GL_MAX 0x8008 70 #define GL_CONSTANT_COLOR 0x8001 71 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 72 #define GL_CONSTANT_ALPHA 0x8003 73 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 74 75 typedef void(APIENTRYP PFNDOLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, 76 GLenum sfactorAlpha, GLenum dfactorAlpha); 77 typedef void(APIENTRYP PFNDOLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint* first, 78 const GLsizei* count, GLsizei drawcount); 79 typedef void(APIENTRYP PFNDOLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei* count, GLenum type, 80 const void* const* indices, GLsizei drawcount); 81 typedef void(APIENTRYP PFNDOLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); 82 typedef void(APIENTRYP PFNDOLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat* params); 83 typedef void(APIENTRYP PFNDOLPOINTPARAMETERIPROC)(GLenum pname, GLint param); 84 typedef void(APIENTRYP PFNDOLPOINTPARAMETERIVPROC)(GLenum pname, const GLint* params); 85 typedef void(APIENTRYP PFNDOLFOGCOORDFPROC)(GLfloat coord); 86 typedef void(APIENTRYP PFNDOLFOGCOORDFVPROC)(const GLfloat* coord); 87 typedef void(APIENTRYP PFNDOLFOGCOORDDPROC)(GLdouble coord); 88 typedef void(APIENTRYP PFNDOLFOGCOORDDVPROC)(const GLdouble* coord); 89 typedef void(APIENTRYP PFNDOLFOGCOORDPOINTERPROC)(GLenum type, GLsizei stride, const void* pointer); 90 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3BPROC)(GLbyte red, GLbyte green, GLbyte blue); 91 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3BVPROC)(const GLbyte* v); 92 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3DPROC)(GLdouble red, GLdouble green, GLdouble blue); 93 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3DVPROC)(const GLdouble* v); 94 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3FPROC)(GLfloat red, GLfloat green, GLfloat blue); 95 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3FVPROC)(const GLfloat* v); 96 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3IPROC)(GLint red, GLint green, GLint blue); 97 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3IVPROC)(const GLint* v); 98 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3SPROC)(GLshort red, GLshort green, GLshort blue); 99 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3SVPROC)(const GLshort* v); 100 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3UBPROC)(GLubyte red, GLubyte green, GLubyte blue); 101 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3UBVPROC)(const GLubyte* v); 102 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3UIPROC)(GLuint red, GLuint green, GLuint blue); 103 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3UIVPROC)(const GLuint* v); 104 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3USPROC)(GLushort red, GLushort green, GLushort blue); 105 typedef void(APIENTRYP PFNDOLSECONDARYCOLOR3USVPROC)(const GLushort* v); 106 typedef void(APIENTRYP PFNDOLSECONDARYCOLORPOINTERPROC)(GLint size, GLenum type, GLsizei stride, 107 const void* pointer); 108 typedef void(APIENTRYP PFNDOLWINDOWPOS2DPROC)(GLdouble x, GLdouble y); 109 typedef void(APIENTRYP PFNDOLWINDOWPOS2DVPROC)(const GLdouble* v); 110 typedef void(APIENTRYP PFNDOLWINDOWPOS2FPROC)(GLfloat x, GLfloat y); 111 typedef void(APIENTRYP PFNDOLWINDOWPOS2FVPROC)(const GLfloat* v); 112 typedef void(APIENTRYP PFNDOLWINDOWPOS2IPROC)(GLint x, GLint y); 113 typedef void(APIENTRYP PFNDOLWINDOWPOS2IVPROC)(const GLint* v); 114 typedef void(APIENTRYP PFNDOLWINDOWPOS2SPROC)(GLshort x, GLshort y); 115 typedef void(APIENTRYP PFNDOLWINDOWPOS2SVPROC)(const GLshort* v); 116 typedef void(APIENTRYP PFNDOLWINDOWPOS3DPROC)(GLdouble x, GLdouble y, GLdouble z); 117 typedef void(APIENTRYP PFNDOLWINDOWPOS3DVPROC)(const GLdouble* v); 118 typedef void(APIENTRYP PFNDOLWINDOWPOS3FPROC)(GLfloat x, GLfloat y, GLfloat z); 119 typedef void(APIENTRYP PFNDOLWINDOWPOS3FVPROC)(const GLfloat* v); 120 typedef void(APIENTRYP PFNDOLWINDOWPOS3IPROC)(GLint x, GLint y, GLint z); 121 typedef void(APIENTRYP PFNDOLWINDOWPOS3IVPROC)(const GLint* v); 122 typedef void(APIENTRYP PFNDOLWINDOWPOS3SPROC)(GLshort x, GLshort y, GLshort z); 123 typedef void(APIENTRYP PFNDOLWINDOWPOS3SVPROC)(const GLshort* v); 124 typedef void(APIENTRYP PFNDOLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, 125 GLfloat alpha); 126 typedef void(APIENTRYP PFNDOLBLENDEQUATIONPROC)(GLenum mode); 127 128 // These two are provided by ARB_imaging as well 129 extern PFNDOLBLENDCOLORPROC dolBlendColor; 130 extern PFNDOLBLENDEQUATIONPROC dolBlendEquation; 131 extern PFNDOLBLENDFUNCSEPARATEPROC dolBlendFuncSeparate; 132 extern PFNDOLFOGCOORDPOINTERPROC dolFogCoordPointer; 133 extern PFNDOLFOGCOORDDPROC dolFogCoordd; 134 extern PFNDOLFOGCOORDDVPROC dolFogCoorddv; 135 extern PFNDOLFOGCOORDFPROC dolFogCoordf; 136 extern PFNDOLFOGCOORDFVPROC dolFogCoordfv; 137 extern PFNDOLMULTIDRAWARRAYSPROC dolMultiDrawArrays; 138 extern PFNDOLMULTIDRAWELEMENTSPROC dolMultiDrawElements; 139 extern PFNDOLPOINTPARAMETERFPROC dolPointParameterf; 140 extern PFNDOLPOINTPARAMETERFVPROC dolPointParameterfv; 141 extern PFNDOLPOINTPARAMETERIPROC dolPointParameteri; 142 extern PFNDOLPOINTPARAMETERIVPROC dolPointParameteriv; 143 extern PFNDOLSECONDARYCOLOR3BPROC dolSecondaryColor3b; 144 extern PFNDOLSECONDARYCOLOR3BVPROC dolSecondaryColor3bv; 145 extern PFNDOLSECONDARYCOLOR3DPROC dolSecondaryColor3d; 146 extern PFNDOLSECONDARYCOLOR3DVPROC dolSecondaryColor3dv; 147 extern PFNDOLSECONDARYCOLOR3FPROC dolSecondaryColor3f; 148 extern PFNDOLSECONDARYCOLOR3FVPROC dolSecondaryColor3fv; 149 extern PFNDOLSECONDARYCOLOR3IPROC dolSecondaryColor3i; 150 extern PFNDOLSECONDARYCOLOR3IVPROC dolSecondaryColor3iv; 151 extern PFNDOLSECONDARYCOLOR3SPROC dolSecondaryColor3s; 152 extern PFNDOLSECONDARYCOLOR3SVPROC dolSecondaryColor3sv; 153 extern PFNDOLSECONDARYCOLOR3UBPROC dolSecondaryColor3ub; 154 extern PFNDOLSECONDARYCOLOR3UBVPROC dolSecondaryColor3ubv; 155 extern PFNDOLSECONDARYCOLOR3UIPROC dolSecondaryColor3ui; 156 extern PFNDOLSECONDARYCOLOR3UIVPROC dolSecondaryColor3uiv; 157 extern PFNDOLSECONDARYCOLOR3USPROC dolSecondaryColor3us; 158 extern PFNDOLSECONDARYCOLOR3USVPROC dolSecondaryColor3usv; 159 extern PFNDOLSECONDARYCOLORPOINTERPROC dolSecondaryColorPointer; 160 extern PFNDOLWINDOWPOS2DPROC dolWindowPos2d; 161 extern PFNDOLWINDOWPOS2DVPROC dolWindowPos2dv; 162 extern PFNDOLWINDOWPOS2FPROC dolWindowPos2f; 163 extern PFNDOLWINDOWPOS2FVPROC dolWindowPos2fv; 164 extern PFNDOLWINDOWPOS2IPROC dolWindowPos2i; 165 extern PFNDOLWINDOWPOS2IVPROC dolWindowPos2iv; 166 extern PFNDOLWINDOWPOS2SPROC dolWindowPos2s; 167 extern PFNDOLWINDOWPOS2SVPROC dolWindowPos2sv; 168 extern PFNDOLWINDOWPOS3DPROC dolWindowPos3d; 169 extern PFNDOLWINDOWPOS3DVPROC dolWindowPos3dv; 170 extern PFNDOLWINDOWPOS3FPROC dolWindowPos3f; 171 extern PFNDOLWINDOWPOS3FVPROC dolWindowPos3fv; 172 extern PFNDOLWINDOWPOS3IPROC dolWindowPos3i; 173 extern PFNDOLWINDOWPOS3IVPROC dolWindowPos3iv; 174 extern PFNDOLWINDOWPOS3SPROC dolWindowPos3s; 175 extern PFNDOLWINDOWPOS3SVPROC dolWindowPos3sv; 176 177 #define glBlendColor dolBlendColor 178 #define glBlendEquation dolBlendEquation 179 #define glBlendFuncSeparate dolBlendFuncSeparate 180 #define glFogCoordPointer dolFogCoordPointer 181 #define glFogCoordd dolFogCoordd 182 #define glFogCoorddv dolFogCoorddv 183 #define glFogCoordf dolFogCoordf 184 #define glFogCoordfv dolFogCoordfv 185 #define glMultiDrawArrays dolMultiDrawArrays 186 #define glMultiDrawElements dolMultiDrawElements 187 #define glPointParameterf dolPointParameterf 188 #define glPointParameterfv dolPointParameterfv 189 #define glPointParameteri dolPointParameteri 190 #define glPointParameteriv dolPointParameteriv 191 #define glSecondaryColor3b dolSecondaryColor3b 192 #define glSecondaryColor3bv dolSecondaryColor3bv 193 #define glSecondaryColor3d dolSecondaryColor3d 194 #define glSecondaryColor3dv dolSecondaryColor3dv 195 #define glSecondaryColor3f dolSecondaryColor3f 196 #define glSecondaryColor3fv dolSecondaryColor3fv 197 #define glSecondaryColor3i dolSecondaryColor3i 198 #define glSecondaryColor3iv dolSecondaryColor3iv 199 #define glSecondaryColor3s dolSecondaryColor3s 200 #define glSecondaryColor3sv dolSecondaryColor3sv 201 #define glSecondaryColor3ub dolSecondaryColor3ub 202 #define glSecondaryColor3ubv dolSecondaryColor3ubv 203 #define glSecondaryColor3ui dolSecondaryColor3ui 204 #define glSecondaryColor3uiv dolSecondaryColor3uiv 205 #define glSecondaryColor3us dolSecondaryColor3us 206 #define glSecondaryColor3usv dolSecondaryColor3usv 207 #define glSecondaryColorPointer dolSecondaryColorPointer 208 #define glWindowPos2d dolWindowPos2d 209 #define glWindowPos2dv dolWindowPos2dv 210 #define glWindowPos2f dolWindowPos2f 211 #define glWindowPos2fv dolWindowPos2fv 212 #define glWindowPos2i dolWindowPos2i 213 #define glWindowPos2iv dolWindowPos2iv 214 #define glWindowPos2s dolWindowPos2s 215 #define glWindowPos2sv dolWindowPos2sv 216 #define glWindowPos3d dolWindowPos3d 217 #define glWindowPos3dv dolWindowPos3dv 218 #define glWindowPos3f dolWindowPos3f 219 #define glWindowPos3fv dolWindowPos3fv 220 #define glWindowPos3i dolWindowPos3i 221 #define glWindowPos3iv dolWindowPos3iv 222 #define glWindowPos3s dolWindowPos3s 223 #define glWindowPos3sv dolWindowPos3sv 224