// Adapted from KHR/khrplatform.h to avoid including entire file. #ifndef __khrplatform_h_ typedef float khronos_float_t; typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; #ifdef _WIN64 typedef signed long long int khronos_intptr_t; typedef signed long long int khronos_ssize_t; #else typedef signed long int khronos_intptr_t; typedef signed long int khronos_ssize_t; #endif #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 khronos_int64_t; typedef unsigned __int64 khronos_uint64_t; #elif (defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100) #include typedef int64_t khronos_int64_t; typedef uint64_t khronos_uint64_t; #else typedef signed long long khronos_int64_t; typedef unsigned long long khronos_uint64_t; #endif #endif // __khrplatform_h_ #ifndef APIENTRY #define APIENTRY #endif #ifndef APIENTRYP #define APIENTRYP APIENTRY * #endif #ifndef GLAPI #define GLAPI extern #endif #ifndef GL_VERSION_1_0 typedef void GLvoid; typedef unsigned int GLenum; typedef khronos_float_t GLfloat; typedef int GLint; typedef int GLsizei; typedef unsigned int GLbitfield; typedef double GLdouble; typedef unsigned int GLuint; typedef unsigned char GLboolean; typedef khronos_uint8_t GLubyte; #define GL_COLOR_BUFFER_BIT 0x00004000 #define GL_FALSE 0 #define GL_TRUE 1 #define GL_TRIANGLES 0x0004 #define GL_ONE 1 #define GL_SRC_ALPHA 0x0302 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_FRONT 0x0404 #define GL_BACK 0x0405 #define GL_FRONT_AND_BACK 0x0408 #define GL_POLYGON_MODE 0x0B40 #define GL_CULL_FACE 0x0B44 #define GL_DEPTH_TEST 0x0B71 #define GL_STENCIL_TEST 0x0B90 #define GL_VIEWPORT 0x0BA2 #define GL_BLEND 0x0BE2 #define GL_SCISSOR_BOX 0x0C10 #define GL_SCISSOR_TEST 0x0C11 #define GL_UNPACK_ROW_LENGTH 0x0CF2 #define GL_PACK_ALIGNMENT 0x0D05 #define GL_TEXTURE_2D 0x0DE1 #define GL_UNSIGNED_BYTE 0x1401 #define GL_UNSIGNED_SHORT 0x1403 #define GL_UNSIGNED_INT 0x1405 #define GL_FLOAT 0x1406 #define GL_RGBA 0x1908 #define GL_FILL 0x1B02 #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 #define GL_VERSION 0x1F02 #define GL_EXTENSIONS 0x1F03 #define GL_LINEAR 0x2601 #define GL_TEXTURE_MAG_FILTER 0x2800 #define GL_TEXTURE_MIN_FILTER 0x2801 typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode); typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap); typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap); typedef void (APIENTRYP PFNGLFLUSHPROC) (void); typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void); typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); GLAPI PFNGLPOLYGONMODEPROC glPolygonMode; GLAPI PFNGLSCISSORPROC glScissor; GLAPI PFNGLTEXPARAMETERIPROC glTexParameteri; GLAPI PFNGLTEXIMAGE2DPROC glTexImage2D; GLAPI PFNGLCLEARPROC glClear; GLAPI PFNGLCLEARCOLORPROC glClearColor; GLAPI PFNGLDISABLEPROC glDisable; GLAPI PFNGLENABLEPROC glEnable; GLAPI PFNGLFLUSHPROC glFlush; GLAPI PFNGLPIXELSTOREIPROC glPixelStorei; GLAPI PFNGLREADPIXELSPROC glReadPixels; GLAPI PFNGLGETERRORPROC glGetError; GLAPI PFNGLGETINTEGERVPROC glGetIntegerv; GLAPI PFNGLGETSTRINGPROC glGetString; GLAPI PFNGLISENABLEDPROC glIsEnabled; GLAPI PFNGLVIEWPORTPROC glViewport; #endif /* GL_VERSION_1_0 */ #ifndef GL_VERSION_1_1 typedef khronos_float_t GLclampf; typedef double GLclampd; #define GL_TEXTURE_BINDING_2D 0x8069 typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); GLAPI PFNGLDRAWELEMENTSPROC glDrawElements; GLAPI PFNGLBINDTEXTUREPROC glBindTexture; GLAPI PFNGLDELETETEXTURESPROC glDeleteTextures; GLAPI PFNGLGENTEXTURESPROC glGenTextures; #endif /* GL_VERSION_1_1 */ #ifndef GL_VERSION_1_3 #define GL_TEXTURE0 0x84C0 #define GL_ACTIVE_TEXTURE 0x84E0 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); GLAPI PFNGLACTIVETEXTUREPROC glActiveTexture; #endif /* GL_VERSION_1_3 */ #ifndef GL_VERSION_1_4 #define GL_BLEND_DST_RGB 0x80C8 #define GL_BLEND_SRC_RGB 0x80C9 #define GL_BLEND_DST_ALPHA 0x80CA #define GL_BLEND_SRC_ALPHA 0x80CB #define GL_FUNC_ADD 0x8006 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); GLAPI PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate; GLAPI PFNGLBLENDEQUATIONPROC glBlendEquation; #endif /* GL_VERSION_1_4 */ #ifndef GL_VERSION_1_5 typedef khronos_ssize_t GLsizeiptr; typedef khronos_intptr_t GLintptr; #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_STREAM_DRAW 0x88E0 typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); GLAPI PFNGLBINDBUFFERPROC glBindBuffer; GLAPI PFNGLDELETEBUFFERSPROC glDeleteBuffers; GLAPI PFNGLGENBUFFERSPROC glGenBuffers; GLAPI PFNGLBUFFERDATAPROC glBufferData; GLAPI PFNGLBUFFERSUBDATAPROC glBufferSubData; #endif /* GL_VERSION_1_5 */ #ifndef GL_VERSION_2_0 typedef char GLchar; typedef khronos_int16_t GLshort; typedef khronos_int8_t GLbyte; typedef khronos_uint16_t GLushort; #define GL_BLEND_EQUATION_RGB 0x8009 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 #define GL_BLEND_EQUATION_ALPHA 0x883D #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 #define GL_COMPILE_STATUS 0x8B81 #define GL_LINK_STATUS 0x8B82 #define GL_INFO_LOG_LENGTH 0x8B84 #define GL_CURRENT_PROGRAM 0x8B8D #define GL_UPPER_LEFT 0x8CA2 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate; GLAPI PFNGLATTACHSHADERPROC glAttachShader; GLAPI PFNGLCOMPILESHADERPROC glCompileShader; GLAPI PFNGLCREATEPROGRAMPROC glCreateProgram; GLAPI PFNGLCREATESHADERPROC glCreateShader; GLAPI PFNGLDELETEPROGRAMPROC glDeleteProgram; GLAPI PFNGLDELETESHADERPROC glDeleteShader; GLAPI PFNGLDETACHSHADERPROC glDetachShader; GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray; GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; GLAPI PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; GLAPI PFNGLGETPROGRAMIVPROC glGetProgramiv; GLAPI PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; GLAPI PFNGLGETSHADERIVPROC glGetShaderiv; GLAPI PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog; GLAPI PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; GLAPI PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv; GLAPI PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv; GLAPI PFNGLISPROGRAMPROC glIsProgram; GLAPI PFNGLLINKPROGRAMPROC glLinkProgram; GLAPI PFNGLSHADERSOURCEPROC glShaderSource; GLAPI PFNGLUSEPROGRAMPROC glUseProgram; GLAPI PFNGLUNIFORM1IPROC glUniform1i; GLAPI PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; GLAPI PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; #endif /* GL_VERSION_2_0 */ #ifndef GL_VERSION_3_0 typedef khronos_uint16_t GLhalf; #define GL_MAJOR_VERSION 0x821B #define GL_MINOR_VERSION 0x821C #define GL_NUM_EXTENSIONS 0x821D #define GL_FRAMEBUFFER_SRGB 0x8DB9 #define GL_VERTEX_ARRAY_BINDING 0x85B5 typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); GLAPI PFNGLGETSTRINGIPROC glGetStringi; GLAPI PFNGLBINDVERTEXARRAYPROC glBindVertexArray; GLAPI PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; GLAPI PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; #endif /* GL_VERSION_3_0 */ #ifndef GL_VERSION_3_1 #define GL_VERSION_3_1 1 #define GL_PRIMITIVE_RESTART 0x8F9D #endif /* GL_VERSION_3_1 */ #ifndef GL_VERSION_3_2 #define GL_VERSION_3_2 1 typedef struct __GLsync *GLsync; typedef khronos_uint64_t GLuint64; typedef khronos_int64_t GLint64; typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); GLAPI PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex; #endif /* GL_VERSION_3_2 */ #ifndef GL_VERSION_3_3 #define GL_VERSION_3_3 1 #define GL_SAMPLER_BINDING 0x8919 typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); GLAPI PFNGLBINDSAMPLERPROC glBindSampler; #endif /* GL_VERSION_3_3 */ #ifndef GL_VERSION_4_1 typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); #endif /* GL_VERSION_4_1 */ #ifndef GL_VERSION_4_3 typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); #endif /* GL_VERSION_4_3 */ #ifndef GL_VERSION_4_5 #define GL_CLIP_ORIGIN 0x935C typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); #endif /* GL_VERSION_4_5 */ #ifndef GL_ARB_bindless_texture typedef khronos_uint64_t GLuint64EXT; #endif /* GL_ARB_bindless_texture */ #ifndef GL_ARB_cl_event struct _cl_context; struct _cl_event; #endif /* GL_ARB_cl_event */ #ifndef GL_ARB_clip_control #define GL_ARB_clip_control 1 #endif /* GL_ARB_clip_control */ #ifndef GL_ARB_debug_output typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); #endif /* GL_ARB_debug_output */ #ifndef GL_EXT_EGL_image_storage typedef void *GLeglImageOES; #endif /* GL_EXT_EGL_image_storage */ #ifndef GL_EXT_direct_state_access typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params); typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params); typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params); typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param); typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param); #endif /* GL_EXT_direct_state_access */ #ifndef GL_NV_draw_vulkan_image typedef void (APIENTRY *GLVULKANPROCNV)(void); #endif /* GL_NV_draw_vulkan_image */ #ifndef GL_NV_gpu_shader5 typedef khronos_int64_t GLint64EXT; #endif /* GL_NV_gpu_shader5 */ #ifndef GL_NV_vertex_buffer_unified_memory typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); #endif /* GL_NV_vertex_buffer_unified_memory */