1 #ifndef __glcorearbext_h_ 2 #define __glcorearbext_h_ 1 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 /* 9 ** Copyright (c) 2010 JogAmp Developer Team 10 ** 11 ** Permission is hereby granted, free of charge, to any person obtaining a 12 ** copy of this software and/or associated documentation files (the 13 ** "Materials"), to deal in the Materials without restriction, including 14 ** without limitation the rights to use, copy, modify, merge, publish, 15 ** distribute, sublicense, and/or sell copies of the Materials, and to 16 ** permit persons to whom the Materials are furnished to do so, subject to 17 ** the following conditions: 18 ** 19 ** The above copyright notice and this permission notice shall be included 20 ** in all copies or substantial portions of the Materials. 21 ** 22 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 26 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 27 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 28 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 29 */ 30 31 /** 32 * This header files contains additional extensions not covered by the 33 * 'official' khronos glcorearb.h 34 */ 35 36 /* 37 * ------------------------------------------------ 38 * Everything here and below was added manually 39 * to the version of glext.h obtained from: 40 * http://oss.sgi.com/projects/ogl-sample/registry/index.html 41 * ------------------------------------------------ 42 * 43 * Structure is: 44 * #ifndef GL_EXTENSION_NAME 45 * Add DEFINES here 46 * #endif 47 * #ifndef GL_EXTENSION_NAME 48 * Add TYPEDEFS here 49 * #endif 50 * #ifndef GL_EXTENSION_NAME 51 * #define GL_EXTENSION_NAME 1 52 * #ifdef GL_GLEXT_PROTOTYPES 53 * Add FUNCTION DECLARATIONS here 54 * #endif 55 * FUNCTION POINTER DECLARATIONS NOT NEEDED 56 * #endif 57 */ 58 59 /** 60 * 47. http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt 61 */ 62 #ifndef GL_ARB_geometry_shader4 63 #define GL_LINES_ADJACENCY_ARB 0x000A 64 #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B 65 #define GL_TRIANGLES_ADJACENCY_ARB 0x000C 66 #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D 67 #define GL_PROGRAM_POINT_SIZE_ARB 0x8642 68 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 69 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 70 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 71 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 72 #define GL_GEOMETRY_SHADER_ARB 0x8DD9 73 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA 74 #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB 75 #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC 76 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD 77 #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE 78 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF 79 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 80 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 81 #ifndef GL_MAX_VARYING_COMPONENTS 82 #define GL_MAX_VARYING_COMPONENTS 0x8B4B 83 #endif 84 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 85 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 86 #endif 87 #endif 88 #ifndef GL_ARB_geometry_shader4 89 #define GL_ARB_geometry_shader4 1 90 #ifdef GL_GLEXT_PROTOTYPES 91 GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); 92 GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); 93 GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); 94 GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); 95 #endif /* GL_GLEXT_PROTOTYPES */ 96 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 97 #endif 98 99 // #187 100 #ifndef GL_EXT_texture_filter_anisotropic 101 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE 102 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF 103 #endif 104 #ifndef GL_EXT_texture_filter_anisotropic 105 #define GL_EXT_texture_filter_anisotropic 1 106 #endif 107 108 // #363 http://www.opengl.org/registry/specs/AMD/vertex_shader_tessellator.txt 109 #ifndef GL_AMD_vertex_shader_tessellator 110 #define GL_SAMPLER_BUFFER_AMD 0x9001 111 #define GL_INT_SAMPLER_BUFFER_AMD 0x9002 112 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 113 #define GL_DISCRETE_AMD 0x9006 114 #define GL_CONTINUOUS_AMD 0x9007 115 #define GL_TESSELLATION_MODE_AMD 0x9004 116 #define GL_TESSELLATION_FACTOR_AMD 0x9005 117 #endif 118 #ifndef GL_AMD_vertex_shader_tessellator 119 #define GL_AMD_vertex_shader_tessellator 1 120 #ifdef GL_GLEXT_PROTOTYPES 121 GLAPI void APIENTRY glTessellationFactorAMD(GLfloat factor); 122 GLAPI void APIENTRY glTessellationModeAMD(GLenum mode); 123 #endif /* GL_GLEXT_PROTOTYPES */ 124 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 125 #endif 126 127 // #379 http://www.opengl.org/registry/specs/NV/shader_buffer_load.txt 128 #ifndef GL_NV_shader_buffer_load 129 #define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D 130 #define GL_GPU_ADDRESS_NV 0x8F34 131 #define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 132 #endif 133 #ifndef GL_NV_shader_buffer_load 134 #define GL_NV_shader_buffer_load 1 135 #ifdef GL_GLEXT_PROTOTYPES 136 GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); 137 GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); 138 GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); 139 GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); 140 GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); 141 GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); 142 GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); 143 GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); 144 GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); 145 GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); 146 GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); 147 GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); 148 GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); 149 GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); 150 #endif /* GL_GLEXT_PROTOTYPES */ 151 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 152 #endif 153 154 // #380 http://www.opengl.org/registry/specs/NV/vertex_buffer_unified_memory.txt 155 #ifndef GL_NV_vertex_buffer_unified_memory 156 #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E 157 #define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F 158 #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 159 #define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 160 #define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 161 #define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 162 #define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 163 #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 164 #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 165 #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 166 #define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 167 #define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 168 #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A 169 #define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B 170 #define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C 171 #define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D 172 #define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E 173 #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F 174 #define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 175 #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 176 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 177 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 178 #define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 179 #define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 180 #define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 181 #endif 182 #ifndef GL_NV_vertex_buffer_unified_memory 183 #define GL_NV_vertex_buffer_unified_memory 1 184 #ifdef GL_GLEXT_PROTOTYPES 185 GLAPI GLboolean APIENTRY glIsEnabled( GLenum cap ); // extra requirement in core GL3 186 GLAPI void APIENTRY glEnableClientState( GLenum cap ); // extra requirement in core GL3 187 GLAPI void APIENTRY glDisableClientState( GLenum cap ); // extra requirement in core GL3 188 GLAPI void APIENTRY glBufferAddressRangeNV(GLenum pname, GLuint index, GLuint64 address, GLsizeiptr length); 189 GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); 190 GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); 191 GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); 192 GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); 193 GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); 194 GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); 195 GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); 196 GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); 197 GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); 198 GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); 199 GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); 200 GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); 201 #endif /* GL_GLEXT_PROTOTYPES */ 202 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 203 #endif 204 205 // #395 206 #ifndef GL_AMD_debug_output 207 #define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 208 #define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 209 #define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 210 #define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 211 #define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 212 #define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 213 #define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A 214 #define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B 215 #define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C 216 #define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D 217 #define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E 218 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F 219 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 220 #endif 221 #ifndef GL_AMD_debug_output 222 typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); 223 #endif 224 #ifndef GL_AMD_debug_output 225 #define GL_AMD_debug_output 1 226 #ifdef GL_GLEXT_PROTOTYPES 227 GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 228 GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); 229 GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); 230 GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); 231 #endif /* GL_GLEXT_PROTOTYPES */ 232 typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 233 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); 234 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); 235 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); 236 #endif 237 238 // #401 239 #ifndef GL_AMD_depth_clamp_separate 240 #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E 241 #define GL_DEPTH_CLAMP_FAR_AMD 0x901F 242 #endif 243 #ifndef GL_AMD_depth_clamp_separate 244 #define GL_AMD_depth_clamp_separate 1 245 #endif 246 247 // #402 248 #ifndef GL_EXT_texture_sRGB_decode 249 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 250 #define GL_DECODE_EXT 0x8A49 251 #define GL_SKIP_DECODE_EXT 0x8A4A 252 #endif 253 #ifndef GL_EXT_texture_sRGB_decode 254 #define GL_EXT_texture_sRGB_decode 1 255 #endif 256 257 // #403 258 #ifndef GL_NV_texture_multisample 259 #define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 260 #define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 261 #endif 262 #ifndef GL_NV_texture_multisample 263 #define GL_NV_texture_multisample 1 264 #ifdef GL_GLEXT_PROTOTYPES 265 GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); 266 GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); 267 GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); 268 GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); 269 GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); 270 GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); 271 #endif /* GL_GLEXT_PROTOTYPES */ 272 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 273 #endif 274 275 // #404 276 #ifndef GL_AMD_blend_minmax_factor 277 #define GL_FACTOR_MIN_AMD 0x901C 278 #define GL_FACTOR_MAX_AMD 0x901D 279 #endif 280 #ifndef GL_AMD_blend_minmax_factor 281 #define GL_AMD_blend_minmax_factor 1 282 #endif 283 284 // #405 285 #ifndef GL_AMD_sample_positions 286 #define GL_SUBSAMPLE_DISTANCE_AMD 0x883F 287 #endif 288 #ifndef GL_AMD_sample_positions 289 #define GL_AMD_sample_positions 1 290 #ifdef GL_GLEXT_PROTOTYPES 291 GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); 292 #endif /* GL_GLEXT_PROTOTYPES */ 293 typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); 294 #endif 295 296 // #406 297 #ifndef GL_EXT_x11_sync_object 298 #define GL_SYNC_X11_FENCE_EXT 0x90E1 299 #endif 300 #ifndef GL_EXT_x11_sync_object 301 #define GL_EXT_x11_sync_object 1 302 #ifdef GL_GLEXT_PROTOTYPES 303 GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); 304 #endif /* GL_GLEXT_PROTOTYPES */ 305 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 306 #endif 307 308 // #408 309 #ifndef GL_AMD_multi_draw_indirect 310 #endif 311 #ifndef GL_AMD_multi_draw_indirect 312 #define GL_AMD_multi_draw_indirect 1 313 #ifdef GL_GLEXT_PROTOTYPES 314 GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); 315 GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); 316 #endif /* GL_GLEXT_PROTOTYPES */ 317 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 318 #endif 319 320 // #409 321 #ifndef GL_EXT_framebuffer_multisample_blit_scaled 322 #define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA 323 #define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB 324 #endif 325 #ifndef GL_EXT_framebuffer_multisample_blit_scaled 326 #define GL_EXT_framebuffer_multisample_blit_scaled 1 327 #endif 328 329 // #410 GL_NV_path_rendering ? 330 331 // #411 332 #ifndef GL_AMD_pinned_memory 333 #define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 334 #endif 335 #ifndef GL_AMD_pinned_memory 336 #define GL_AMD_pinned_memory 1 337 #endif 338 339 // #413 340 #ifndef GL_AMD_stencil_operation_extended 341 #define GL_SET_AMD 0x874A 342 #define GL_REPLACE_VALUE_AMD 0x874B 343 #define GL_STENCIL_OP_VALUE_AMD 0x874C 344 #define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D 345 #endif 346 #ifndef GL_AMD_stencil_operation_extended 347 #define GL_AMD_stencil_operation_extended 1 348 #ifdef GL_GLEXT_PROTOTYPES 349 GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); 350 #endif /* GL_GLEXT_PROTOTYPES */ 351 /* No need for explicit function pointer: we force generation of ProcAddress .. */ 352 #endif 353 354 #ifdef __cplusplus 355 } 356 #endif 357 358 #endif /* __glcorearbext_h_ */ 359 360