2013-01-10 19:11:03 +00:00
|
|
|
/*
|
2014-09-07 15:27:49 +00:00
|
|
|
* Copyright (C) 2011-2014 Gregory hainaut
|
2013-01-10 19:11:03 +00:00
|
|
|
* Copyright (C) 2007-2009 Gabest
|
|
|
|
*
|
|
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This Program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNU Make; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-09-07 15:27:49 +00:00
|
|
|
#define GL_TEX_LEVEL_0 (0)
|
|
|
|
#define GL_TEX_LEVEL_1 (1)
|
|
|
|
#define GL_FB_DEFAULT (0)
|
|
|
|
#define GL_BUFFER_0 (0)
|
|
|
|
|
2015-12-29 21:27:24 +00:00
|
|
|
#ifndef GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR
|
|
|
|
#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
|
|
|
|
#endif
|
|
|
|
|
2014-03-13 17:37:40 +00:00
|
|
|
// FIX compilation issue with Mesa 10
|
2015-12-29 21:27:24 +00:00
|
|
|
// Note it might be possible to do better with the right include
|
2014-03-13 17:37:40 +00:00
|
|
|
// in the rigth order but I don't have time
|
|
|
|
#ifndef APIENTRY
|
|
|
|
#define APIENTRY
|
|
|
|
#endif
|
|
|
|
#ifndef APIENTRYP
|
|
|
|
#define APIENTRYP APIENTRY *
|
|
|
|
#endif
|
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
// Allow compilation with older mesa
|
2014-11-11 14:01:22 +00:00
|
|
|
#ifndef GL_VERSION_4_3
|
|
|
|
#define GL_VERSION_4_3 1
|
|
|
|
typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
|
|
|
|
#endif
|
2013-08-03 08:29:01 +00:00
|
|
|
|
|
|
|
#ifndef GL_ARB_copy_image
|
|
|
|
#define GL_ARB_copy_image 1
|
|
|
|
#ifdef GL_GLEXT_PROTOTYPES
|
|
|
|
GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
|
|
|
#endif /* GL_GLEXT_PROTOTYPES */
|
|
|
|
typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GL_VERSION_4_4
|
|
|
|
#define GL_VERSION_4_4 1
|
|
|
|
#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
|
|
|
|
#define GL_MAP_PERSISTENT_BIT 0x0040
|
|
|
|
#define GL_MAP_COHERENT_BIT 0x0080
|
|
|
|
#define GL_DYNAMIC_STORAGE_BIT 0x0100
|
|
|
|
#define GL_CLIENT_STORAGE_BIT 0x0200
|
|
|
|
#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
|
|
|
|
#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
|
|
|
|
#define GL_BUFFER_STORAGE_FLAGS 0x8220
|
|
|
|
#define GL_CLEAR_TEXTURE 0x9365
|
|
|
|
#define GL_LOCATION_COMPONENT 0x934A
|
|
|
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
|
|
|
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
|
|
|
|
#define GL_QUERY_BUFFER 0x9192
|
|
|
|
#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
|
|
|
|
#define GL_QUERY_BUFFER_BINDING 0x9193
|
|
|
|
#define GL_QUERY_RESULT_NO_WAIT 0x9194
|
|
|
|
#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
|
|
|
|
typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
|
|
|
#endif /* GL_VERSION_4_4 */
|
|
|
|
|
2014-09-07 15:27:49 +00:00
|
|
|
// Note: trim it
|
|
|
|
#ifndef GL_VERSION_4_5
|
|
|
|
#define GL_VERSION_4_5 1
|
|
|
|
#define GL_CONTEXT_LOST 0x0507
|
|
|
|
#define GL_NEGATIVE_ONE_TO_ONE 0x935E
|
|
|
|
#define GL_ZERO_TO_ONE 0x935F
|
|
|
|
#define GL_CLIP_ORIGIN 0x935C
|
|
|
|
#define GL_CLIP_DEPTH_MODE 0x935D
|
|
|
|
#define GL_QUERY_WAIT_INVERTED 0x8E17
|
|
|
|
#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
|
|
|
|
#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
|
|
|
|
#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
|
|
|
|
#define GL_MAX_CULL_DISTANCES 0x82F9
|
|
|
|
#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
|
|
|
|
#define GL_TEXTURE_TARGET 0x1006
|
|
|
|
#define GL_QUERY_TARGET 0x82EA
|
|
|
|
#define GL_TEXTURE_BINDING 0x82EB
|
|
|
|
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
|
|
|
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
|
|
|
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
|
|
|
#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
|
|
|
|
#define GL_LOSE_CONTEXT_ON_RESET 0x8252
|
|
|
|
#define GL_NO_RESET_NOTIFICATION 0x8261
|
|
|
|
#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
|
|
|
|
#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
|
|
|
|
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
|
|
|
|
typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizei size, const void *data, GLenum usage);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
|
|
|
|
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
|
|
|
|
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
|
|
|
|
typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
|
|
|
|
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src);
|
|
|
|
typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
|
|
|
|
typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
|
|
|
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
|
|
|
|
typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
|
|
|
typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
|
|
|
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
|
|
|
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
|
|
|
|
typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
|
|
|
|
typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
|
|
|
|
typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
|
|
|
|
typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
|
|
|
typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
|
|
|
|
typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param);
|
|
|
|
typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
|
|
|
|
typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
|
|
|
|
typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids);
|
|
|
|
typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
|
|
|
|
typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
|
|
|
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
|
|
|
|
typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
|
|
|
typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
|
|
|
typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
|
|
|
typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
|
|
|
|
typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
|
|
|
#endif /* GL_VERSION_4_5 */
|
|
|
|
|
2016-07-07 20:23:20 +00:00
|
|
|
#ifndef GL_NVX_gpu_memory_info
|
|
|
|
#define GL_NVX_gpu_memory_info 1
|
|
|
|
#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
|
|
|
|
#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
|
|
|
|
#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
|
|
|
|
#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
|
|
|
|
#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
|
|
|
|
#endif /* GL_NVX_gpu_memory_info */
|
|
|
|
|
|
|
|
// ********************** End of the extra header ******************* //
|
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
// #define ENABLE_GL_ARB_ES3_2_compatibility 1
|
|
|
|
// #define ENABLE_GL_ARB_bindless_texture 1
|
|
|
|
// #define ENABLE_GL_ARB_cl_event 1
|
|
|
|
// #define ENABLE_GL_ARB_compute_variable_group_size 1
|
|
|
|
#define ENABLE_GL_ARB_debug_output 1
|
|
|
|
// #define ENABLE_GL_ARB_draw_buffers_blend 1
|
|
|
|
// #define ENABLE_GL_ARB_draw_instanced 1
|
|
|
|
// #define ENABLE_GL_ARB_geometry_shader4 1
|
|
|
|
// #define ENABLE_GL_ARB_gl_spirv 1
|
|
|
|
// #define ENABLE_GL_ARB_gpu_shader_int64 1
|
|
|
|
// #define ENABLE_GL_ARB_indirect_parameters 1
|
|
|
|
// #define ENABLE_GL_ARB_instanced_arrays 1
|
|
|
|
// #define ENABLE_GL_ARB_parallel_shader_compile 1
|
|
|
|
// #define ENABLE_GL_ARB_robustness 1
|
|
|
|
// #define ENABLE_GL_ARB_sample_locations 1
|
|
|
|
// #define ENABLE_GL_ARB_sample_shading 1
|
|
|
|
// #define ENABLE_GL_ARB_shading_language_include 1
|
|
|
|
// #define ENABLE_GL_ARB_sparse_buffer 1
|
|
|
|
// #define ENABLE_GL_ARB_sparse_texture 1
|
|
|
|
// #define ENABLE_GL_ARB_texture_buffer_object 1
|
|
|
|
// #define ENABLE_GL_KHR_blend_equation_advanced 1
|
|
|
|
// #define ENABLE_GL_KHR_parallel_shader_compile 1
|
|
|
|
|
2019-02-01 10:34:59 +00:00
|
|
|
// Dark age of openGL. GL_10 and GL_11 are provided by opengl32.dll on windows.
|
|
|
|
// Linux is a royal mess
|
|
|
|
//
|
2019-01-29 15:38:37 +00:00
|
|
|
// #define ENABLE_GL_VERSION_1_0 1
|
|
|
|
// #define ENABLE_GL_VERSION_1_1 1
|
2019-02-01 10:34:59 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#define ENABLE_GL_VERSION_1_2 1
|
|
|
|
#define ENABLE_GL_VERSION_1_3 1
|
|
|
|
#define ENABLE_GL_VERSION_1_4 1
|
|
|
|
#endif
|
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
#define ENABLE_GL_VERSION_1_5 1
|
|
|
|
#define ENABLE_GL_VERSION_2_0 1
|
|
|
|
#define ENABLE_GL_VERSION_2_1 1
|
|
|
|
#define ENABLE_GL_VERSION_3_0 1
|
|
|
|
#define ENABLE_GL_VERSION_3_1 1
|
|
|
|
#define ENABLE_GL_VERSION_3_2 1
|
|
|
|
#define ENABLE_GL_VERSION_3_3 1
|
|
|
|
#define ENABLE_GL_VERSION_4_0 1
|
|
|
|
#define ENABLE_GL_VERSION_4_1 1
|
|
|
|
#define ENABLE_GL_VERSION_4_2 1
|
|
|
|
#define ENABLE_GL_VERSION_4_3 1
|
|
|
|
#define ENABLE_GL_VERSION_4_4 1
|
|
|
|
#define ENABLE_GL_VERSION_4_5 1
|
|
|
|
// #define ENABLE_GL_VERSION_4_6 1
|
|
|
|
|
2019-02-01 10:34:59 +00:00
|
|
|
// It should be done by ENABLE_GL_VERSION_1_4 but it conflicts with the old gl.h
|
|
|
|
#ifdef __unix__
|
2015-10-17 15:05:15 +00:00
|
|
|
extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
|
2019-02-01 10:34:59 +00:00
|
|
|
#endif
|
2014-09-07 15:27:49 +00:00
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
#include "PFN_GLLOADER_HPP.h"
|
2017-02-17 16:44:26 +00:00
|
|
|
|
2019-02-01 10:36:05 +00:00
|
|
|
/*************************************************************
|
|
|
|
* Extra define not provided in glcorearb.h
|
|
|
|
* Currently they are included in the legacy glext.h but the plan
|
|
|
|
* is to move to core only OpenGL
|
|
|
|
************************************************************/
|
|
|
|
|
|
|
|
// Extension not in core profile. It will become irrelevant with sparse texture
|
|
|
|
#ifndef GL_TEXTURE_FREE_MEMORY_ATI
|
|
|
|
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Added in GL4.6. Code should be updated but driver support...
|
|
|
|
#ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
|
|
|
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
|
|
|
#endif
|
|
|
|
|
2017-02-17 16:44:26 +00:00
|
|
|
|
2013-01-14 09:15:39 +00:00
|
|
|
namespace GLLoader {
|
2017-05-11 20:35:31 +00:00
|
|
|
void check_gl_requirements();
|
2013-05-19 12:42:55 +00:00
|
|
|
|
2017-08-02 17:52:15 +00:00
|
|
|
extern bool vendor_id_amd;
|
|
|
|
extern bool vendor_id_nvidia;
|
|
|
|
extern bool vendor_id_intel;
|
|
|
|
extern bool amd_legacy_buggy_driver;
|
|
|
|
extern bool mesa_driver;
|
2016-06-01 18:58:10 +00:00
|
|
|
extern bool buggy_sso_dual_src;
|
2013-07-28 14:40:43 +00:00
|
|
|
extern bool in_replayer;
|
2013-07-11 17:08:42 +00:00
|
|
|
|
2014-09-30 19:56:36 +00:00
|
|
|
// GL
|
2013-05-27 16:53:38 +00:00
|
|
|
extern bool found_geometry_shader;
|
2017-04-05 17:35:00 +00:00
|
|
|
extern bool found_GL_ARB_copy_image;
|
2017-04-04 16:37:26 +00:00
|
|
|
extern bool found_GL_ARB_clip_control;
|
2013-06-16 16:33:08 +00:00
|
|
|
extern bool found_GL_ARB_gpu_shader5;
|
2013-07-28 14:40:43 +00:00
|
|
|
extern bool found_GL_ARB_shader_image_load_store;
|
2013-08-02 16:38:12 +00:00
|
|
|
extern bool found_GL_ARB_clear_texture;
|
2014-09-07 15:27:49 +00:00
|
|
|
extern bool found_GL_ARB_direct_state_access;
|
2015-05-02 08:53:19 +00:00
|
|
|
extern bool found_GL_EXT_texture_filter_anisotropic;
|
2016-07-07 20:02:10 +00:00
|
|
|
extern bool found_GL_NVX_gpu_memory_info;
|
|
|
|
extern bool found_GL_ATI_meminfo;
|
2013-01-10 19:11:03 +00:00
|
|
|
}
|