diff --git a/src/lib/glad/glad.c b/src/lib/glad/glad.c index 199f5367..f616c012 100644 --- a/src/lib/glad/glad.c +++ b/src/lib/glad/glad.c @@ -1,6 +1,6 @@ /* - OpenGL, OpenGL ES loader generated by glad 0.1.28 on Wed Jan 30 04:34:55 2019. + OpenGL, OpenGL ES loader generated by glad 0.1.29 on Tue May 28 12:13:32 2019. Language/Generator: C/C++ Specification: gl @@ -16,18 +16,22 @@ GL_ARB_shader_storage_buffer_object, GL_ARB_texture_storage, GL_ARB_viewport_array, + GL_EXT_disjoint_timer_query, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB + GL_EXT_texture_sRGB, + GL_OVR_multiview, + GL_OVR_multiview2, + GL_OVR_multiview_multisampled_render_to_texture Loader: False Local files: True Omit khrplatform: False Reproducible: False Commandline: - --profile="core" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --local-files --extensions="GL_AMD_vertex_shader_viewport_index,GL_ARB_buffer_storage,GL_ARB_compute_shader,GL_ARB_fragment_layer_viewport,GL_ARB_program_interface_query,GL_ARB_shader_image_load_store,GL_ARB_shader_storage_buffer_object,GL_ARB_texture_storage,GL_ARB_viewport_array,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB" + --profile="core" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --local-files --extensions="GL_AMD_vertex_shader_viewport_index,GL_ARB_buffer_storage,GL_ARB_compute_shader,GL_ARB_fragment_layer_viewport,GL_ARB_program_interface_query,GL_ARB_shader_image_load_store,GL_ARB_shader_storage_buffer_object,GL_ARB_texture_storage,GL_ARB_viewport_array,GL_EXT_disjoint_timer_query,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_OVR_multiview,GL_OVR_multiview2,GL_OVR_multiview_multisampled_render_to_texture" Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_AMD_vertex_shader_viewport_index&extensions=GL_ARB_buffer_storage&extensions=GL_ARB_compute_shader&extensions=GL_ARB_fragment_layer_viewport&extensions=GL_ARB_program_interface_query&extensions=GL_ARB_shader_image_load_store&extensions=GL_ARB_shader_storage_buffer_object&extensions=GL_ARB_texture_storage&extensions=GL_ARB_viewport_array&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB + https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_AMD_vertex_shader_viewport_index&extensions=GL_ARB_buffer_storage&extensions=GL_ARB_compute_shader&extensions=GL_ARB_fragment_layer_viewport&extensions=GL_ARB_program_interface_query&extensions=GL_ARB_shader_image_load_store&extensions=GL_ARB_shader_storage_buffer_object&extensions=GL_ARB_texture_storage&extensions=GL_ARB_viewport_array&extensions=GL_EXT_disjoint_timer_query&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_OVR_multiview&extensions=GL_OVR_multiview2&extensions=GL_OVR_multiview_multisampled_render_to_texture */ #include @@ -60,11 +64,7 @@ static int get_exts(void) { num_exts_i = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); if (num_exts_i > 0) { - char **tmp_exts_i = (char **)realloc((void *)exts_i, (size_t)num_exts_i * (sizeof *exts_i)); - if (tmp_exts_i == NULL) { - return 0; - } - exts_i = tmp_exts_i; + exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i)); } if (exts_i == NULL) { @@ -646,9 +646,13 @@ int GLAD_GL_ARB_shader_image_load_store = 0; int GLAD_GL_ARB_shader_storage_buffer_object = 0; int GLAD_GL_ARB_texture_storage = 0; int GLAD_GL_ARB_viewport_array = 0; +int GLAD_GL_EXT_disjoint_timer_query = 0; int GLAD_GL_EXT_texture_compression_s3tc = 0; int GLAD_GL_EXT_texture_filter_anisotropic = 0; int GLAD_GL_EXT_texture_sRGB = 0; +int GLAD_GL_OVR_multiview = 0; +int GLAD_GL_OVR_multiview2 = 0; +int GLAD_GL_OVR_multiview_multisampled_render_to_texture = 0; PFNGLBUFFERSTORAGEPROC glad_glBufferStorage = NULL; PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex = NULL; PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding = NULL; @@ -663,6 +667,19 @@ PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv = NULL; PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed = NULL; PFNGLGETFLOATI_VPROC glad_glGetFloati_v = NULL; PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v = NULL; +PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC glad_glFramebufferTextureMultiviewOVR = NULL; +PFNGLGENQUERIESEXTPROC glad_glGenQueriesEXT = NULL; +PFNGLDELETEQUERIESEXTPROC glad_glDeleteQueriesEXT = NULL; +PFNGLISQUERYEXTPROC glad_glIsQueryEXT = NULL; +PFNGLBEGINQUERYEXTPROC glad_glBeginQueryEXT = NULL; +PFNGLENDQUERYEXTPROC glad_glEndQueryEXT = NULL; +PFNGLQUERYCOUNTEREXTPROC glad_glQueryCounterEXT = NULL; +PFNGLGETQUERYIVEXTPROC glad_glGetQueryivEXT = NULL; +PFNGLGETQUERYOBJECTIVEXTPROC glad_glGetQueryObjectivEXT = NULL; +PFNGLGETQUERYOBJECTUIVEXTPROC glad_glGetQueryObjectuivEXT = NULL; +PFNGLGETQUERYOBJECTI64VEXTPROC glad_glGetQueryObjecti64vEXT = NULL; +PFNGLGETQUERYOBJECTUI64VEXTPROC glad_glGetQueryObjectui64vEXT = NULL; +PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC glad_glFramebufferTextureMultisampleMultiviewOVR = NULL; static void load_GL_VERSION_1_0(GLADloadproc load) { if(!GLAD_GL_VERSION_1_0) return; glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); @@ -1122,6 +1139,10 @@ static void load_GL_ARB_viewport_array(GLADloadproc load) { glad_glGetFloati_v = (PFNGLGETFLOATI_VPROC)load("glGetFloati_v"); glad_glGetDoublei_v = (PFNGLGETDOUBLEI_VPROC)load("glGetDoublei_v"); } +static void load_GL_OVR_multiview(GLADloadproc load) { + if(!GLAD_GL_OVR_multiview) return; + glad_glFramebufferTextureMultiviewOVR = (PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)load("glFramebufferTextureMultiviewOVR"); +} static int find_extensionsGL(void) { if (!get_exts()) return 0; GLAD_GL_AMD_vertex_shader_viewport_index = has_ext("GL_AMD_vertex_shader_viewport_index"); @@ -1136,6 +1157,8 @@ static int find_extensionsGL(void) { GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc"); GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic"); GLAD_GL_EXT_texture_sRGB = has_ext("GL_EXT_texture_sRGB"); + GLAD_GL_OVR_multiview = has_ext("GL_OVR_multiview"); + GLAD_GL_OVR_multiview2 = has_ext("GL_OVR_multiview2"); free_exts(); return 1; } @@ -1221,6 +1244,7 @@ int gladLoadGLLoader(GLADloadproc load) { load_GL_ARB_shader_storage_buffer_object(load); load_GL_ARB_texture_storage(load); load_GL_ARB_viewport_array(load); + load_GL_OVR_multiview(load); return GLVersion.major != 0 || GLVersion.minor != 0; } @@ -1594,10 +1618,32 @@ static void load_GL_ES_VERSION_3_2(GLADloadproc load) { glad_glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)load("glTexBufferRange"); glad_glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)load("glTexStorage3DMultisample"); } +static void load_GL_EXT_disjoint_timer_query(GLADloadproc load) { + if(!GLAD_GL_EXT_disjoint_timer_query) return; + glad_glGenQueriesEXT = (PFNGLGENQUERIESEXTPROC)load("glGenQueriesEXT"); + glad_glDeleteQueriesEXT = (PFNGLDELETEQUERIESEXTPROC)load("glDeleteQueriesEXT"); + glad_glIsQueryEXT = (PFNGLISQUERYEXTPROC)load("glIsQueryEXT"); + glad_glBeginQueryEXT = (PFNGLBEGINQUERYEXTPROC)load("glBeginQueryEXT"); + glad_glEndQueryEXT = (PFNGLENDQUERYEXTPROC)load("glEndQueryEXT"); + glad_glQueryCounterEXT = (PFNGLQUERYCOUNTEREXTPROC)load("glQueryCounterEXT"); + glad_glGetQueryivEXT = (PFNGLGETQUERYIVEXTPROC)load("glGetQueryivEXT"); + glad_glGetQueryObjectivEXT = (PFNGLGETQUERYOBJECTIVEXTPROC)load("glGetQueryObjectivEXT"); + glad_glGetQueryObjectuivEXT = (PFNGLGETQUERYOBJECTUIVEXTPROC)load("glGetQueryObjectuivEXT"); + glad_glGetQueryObjecti64vEXT = (PFNGLGETQUERYOBJECTI64VEXTPROC)load("glGetQueryObjecti64vEXT"); + glad_glGetQueryObjectui64vEXT = (PFNGLGETQUERYOBJECTUI64VEXTPROC)load("glGetQueryObjectui64vEXT"); +} +static void load_GL_OVR_multiview_multisampled_render_to_texture(GLADloadproc load) { + if(!GLAD_GL_OVR_multiview_multisampled_render_to_texture) return; + glad_glFramebufferTextureMultisampleMultiviewOVR = (PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC)load("glFramebufferTextureMultisampleMultiviewOVR"); +} static int find_extensionsGLES2(void) { if (!get_exts()) return 0; + GLAD_GL_EXT_disjoint_timer_query = has_ext("GL_EXT_disjoint_timer_query"); GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc"); GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic"); + GLAD_GL_OVR_multiview = has_ext("GL_OVR_multiview"); + GLAD_GL_OVR_multiview2 = has_ext("GL_OVR_multiview2"); + GLAD_GL_OVR_multiview_multisampled_render_to_texture = has_ext("GL_OVR_multiview_multisampled_render_to_texture"); free_exts(); return 1; } @@ -1660,6 +1706,9 @@ int gladLoadGLES2Loader(GLADloadproc load) { load_GL_ES_VERSION_3_2(load); if (!find_extensionsGLES2()) return 0; + load_GL_EXT_disjoint_timer_query(load); + load_GL_OVR_multiview(load); + load_GL_OVR_multiview_multisampled_render_to_texture(load); return GLVersion.major != 0 || GLVersion.minor != 0; } diff --git a/src/lib/glad/glad.h b/src/lib/glad/glad.h index 643dae32..f5a54024 100644 --- a/src/lib/glad/glad.h +++ b/src/lib/glad/glad.h @@ -1,6 +1,6 @@ /* - OpenGL, OpenGL ES loader generated by glad 0.1.28 on Wed Jan 30 04:34:55 2019. + OpenGL, OpenGL ES loader generated by glad 0.1.29 on Tue May 28 12:13:32 2019. Language/Generator: C/C++ Specification: gl @@ -16,18 +16,22 @@ GL_ARB_shader_storage_buffer_object, GL_ARB_texture_storage, GL_ARB_viewport_array, + GL_EXT_disjoint_timer_query, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB + GL_EXT_texture_sRGB, + GL_OVR_multiview, + GL_OVR_multiview2, + GL_OVR_multiview_multisampled_render_to_texture Loader: False Local files: True Omit khrplatform: False Reproducible: False Commandline: - --profile="core" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --local-files --extensions="GL_AMD_vertex_shader_viewport_index,GL_ARB_buffer_storage,GL_ARB_compute_shader,GL_ARB_fragment_layer_viewport,GL_ARB_program_interface_query,GL_ARB_shader_image_load_store,GL_ARB_shader_storage_buffer_object,GL_ARB_texture_storage,GL_ARB_viewport_array,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB" + --profile="core" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --local-files --extensions="GL_AMD_vertex_shader_viewport_index,GL_ARB_buffer_storage,GL_ARB_compute_shader,GL_ARB_fragment_layer_viewport,GL_ARB_program_interface_query,GL_ARB_shader_image_load_store,GL_ARB_shader_storage_buffer_object,GL_ARB_texture_storage,GL_ARB_viewport_array,GL_EXT_disjoint_timer_query,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_OVR_multiview,GL_OVR_multiview2,GL_OVR_multiview_multisampled_render_to_texture" Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_AMD_vertex_shader_viewport_index&extensions=GL_ARB_buffer_storage&extensions=GL_ARB_compute_shader&extensions=GL_ARB_fragment_layer_viewport&extensions=GL_ARB_program_interface_query&extensions=GL_ARB_shader_image_load_store&extensions=GL_ARB_shader_storage_buffer_object&extensions=GL_ARB_texture_storage&extensions=GL_ARB_viewport_array&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB + https://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_AMD_vertex_shader_viewport_index&extensions=GL_ARB_buffer_storage&extensions=GL_ARB_compute_shader&extensions=GL_ARB_fragment_layer_viewport&extensions=GL_ARB_program_interface_query&extensions=GL_ARB_shader_image_load_store&extensions=GL_ARB_shader_storage_buffer_object&extensions=GL_ARB_texture_storage&extensions=GL_ARB_viewport_array&extensions=GL_EXT_disjoint_timer_query&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_OVR_multiview&extensions=GL_OVR_multiview2&extensions=GL_OVR_multiview_multisampled_render_to_texture */ @@ -2919,6 +2923,17 @@ GLAPI PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample; #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +#define GL_QUERY_COUNTER_BITS_EXT 0x8864 +#define GL_CURRENT_QUERY_EXT 0x8865 +#define GL_QUERY_RESULT_EXT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 +#define GL_TIME_ELAPSED_EXT 0x88BF +#define GL_TIMESTAMP_EXT 0x8E28 +#define GL_GPU_DISJOINT_EXT 0x8FBB #ifndef GL_AMD_vertex_shader_viewport_index #define GL_AMD_vertex_shader_viewport_index 1 GLAPI int GLAD_GL_AMD_vertex_shader_viewport_index; @@ -3009,6 +3024,54 @@ GLAPI int GLAD_GL_EXT_texture_filter_anisotropic; #define GL_EXT_texture_sRGB 1 GLAPI int GLAD_GL_EXT_texture_sRGB; #endif +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +GLAPI int GLAD_GL_OVR_multiview; +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +GLAPI PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC glad_glFramebufferTextureMultiviewOVR; +#define glFramebufferTextureMultiviewOVR glad_glFramebufferTextureMultiviewOVR +#endif +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +GLAPI int GLAD_GL_OVR_multiview2; +#endif +#ifndef GL_EXT_disjoint_timer_query +#define GL_EXT_disjoint_timer_query 1 +GLAPI int GLAD_GL_EXT_disjoint_timer_query; +typedef void (APIENTRYP PFNGLGENQUERIESEXTPROC)(GLsizei n, GLuint *ids); +GLAPI PFNGLGENQUERIESEXTPROC glad_glGenQueriesEXT; +#define glGenQueriesEXT glad_glGenQueriesEXT +typedef void (APIENTRYP PFNGLDELETEQUERIESEXTPROC)(GLsizei n, const GLuint *ids); +GLAPI PFNGLDELETEQUERIESEXTPROC glad_glDeleteQueriesEXT; +#define glDeleteQueriesEXT glad_glDeleteQueriesEXT +typedef GLboolean (APIENTRYP PFNGLISQUERYEXTPROC)(GLuint id); +GLAPI PFNGLISQUERYEXTPROC glad_glIsQueryEXT; +#define glIsQueryEXT glad_glIsQueryEXT +typedef void (APIENTRYP PFNGLBEGINQUERYEXTPROC)(GLenum target, GLuint id); +GLAPI PFNGLBEGINQUERYEXTPROC glad_glBeginQueryEXT; +#define glBeginQueryEXT glad_glBeginQueryEXT +typedef void (APIENTRYP PFNGLENDQUERYEXTPROC)(GLenum target); +GLAPI PFNGLENDQUERYEXTPROC glad_glEndQueryEXT; +#define glEndQueryEXT glad_glEndQueryEXT +typedef void (APIENTRYP PFNGLQUERYCOUNTEREXTPROC)(GLuint id, GLenum target); +GLAPI PFNGLQUERYCOUNTEREXTPROC glad_glQueryCounterEXT; +#define glQueryCounterEXT glad_glQueryCounterEXT +typedef void (APIENTRYP PFNGLGETQUERYIVEXTPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETQUERYIVEXTPROC glad_glGetQueryivEXT; +#define glGetQueryivEXT glad_glGetQueryivEXT +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC)(GLuint id, GLenum pname, GLint *params); +GLAPI PFNGLGETQUERYOBJECTIVEXTPROC glad_glGetQueryObjectivEXT; +#define glGetQueryObjectivEXT glad_glGetQueryObjectivEXT +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC)(GLuint id, GLenum pname, GLuint *params); +GLAPI PFNGLGETQUERYOBJECTUIVEXTPROC glad_glGetQueryObjectuivEXT; +#define glGetQueryObjectuivEXT glad_glGetQueryObjectuivEXT +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC)(GLuint id, GLenum pname, GLint64 *params); +GLAPI PFNGLGETQUERYOBJECTI64VEXTPROC glad_glGetQueryObjecti64vEXT; +#define glGetQueryObjecti64vEXT glad_glGetQueryObjecti64vEXT +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC)(GLuint id, GLenum pname, GLuint64 *params); +GLAPI PFNGLGETQUERYOBJECTUI64VEXTPROC glad_glGetQueryObjectui64vEXT; +#define glGetQueryObjectui64vEXT glad_glGetQueryObjectui64vEXT +#endif #ifndef GL_EXT_texture_compression_s3tc #define GL_EXT_texture_compression_s3tc 1 GLAPI int GLAD_GL_EXT_texture_compression_s3tc; @@ -3017,6 +3080,21 @@ GLAPI int GLAD_GL_EXT_texture_compression_s3tc; #define GL_EXT_texture_filter_anisotropic 1 GLAPI int GLAD_GL_EXT_texture_filter_anisotropic; #endif +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +GLAPI int GLAD_GL_OVR_multiview; +#endif +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +GLAPI int GLAD_GL_OVR_multiview2; +#endif +#ifndef GL_OVR_multiview_multisampled_render_to_texture +#define GL_OVR_multiview_multisampled_render_to_texture 1 +GLAPI int GLAD_GL_OVR_multiview_multisampled_render_to_texture; +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); +GLAPI PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC glad_glFramebufferTextureMultisampleMultiviewOVR; +#define glFramebufferTextureMultisampleMultiviewOVR glad_glFramebufferTextureMultisampleMultiviewOVR +#endif #ifdef __cplusplus } diff --git a/src/lib/glad/khrplatform.h b/src/lib/glad/khrplatform.h index 975bbffe..5b55ea2b 100644 --- a/src/lib/glad/khrplatform.h +++ b/src/lib/glad/khrplatform.h @@ -90,12 +90,20 @@ * int arg2) KHRONOS_APIATTRIBUTES; */ +#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) +# define KHRONOS_STATIC 1 +#endif + /*------------------------------------------------------------------------- * Definition of KHRONOS_APICALL *------------------------------------------------------------------------- * This precedes the return type of the function in the function prototype. */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +#if defined(KHRONOS_STATIC) + /* If the preprocessor constant KHRONOS_STATIC is defined, make the + * header compatible with static linking. */ +# define KHRONOS_APICALL +#elif defined(_WIN32) # define KHRONOS_APICALL __declspec(dllimport) #elif defined (__SYMBIAN32__) # define KHRONOS_APICALL IMPORT_C @@ -111,7 +119,7 @@ * This follows the return type of the function and precedes the function * name in the function prototype. */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(KHRONOS_STATIC) /* Win32 but not WinCE */ # define KHRONOS_APIENTRY __stdcall #else