mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-08-17 18:40:54 +03:00
Update GL wrapper generated by new version of glad
This commit is contained in:
parent
5efa26a98d
commit
83850b28ae
@ -27,6 +27,10 @@ def regenerate():
|
||||
)
|
||||
|
||||
|
||||
def strip_trailing_whitespace(c):
|
||||
return re.sub(r'\s+$', '', c, flags=re.MULTILINE) + '\n'
|
||||
|
||||
|
||||
def export():
|
||||
c = open('out/src/glad.c', 'rb').read().decode('utf-8')
|
||||
functions = []
|
||||
@ -48,12 +52,13 @@ def sub(m):
|
||||
}
|
||||
return ret;
|
||||
}'''.replace('SUB', ';\n '.join(switch), 1)
|
||||
open('../kitty/gl-wrapper.c', 'w').write(c)
|
||||
open('../kitty/gl-wrapper.c', 'w').write(strip_trailing_whitespace(c))
|
||||
raw = open('out/include/glad/glad.h').read()
|
||||
raw = raw.replace('<KHR/khrplatform.h>', '"khrplatform.h"')
|
||||
raw += '\nint init_glad(GLADloadproc, int);\n'
|
||||
open('../kitty/gl-wrapper.h', 'w').write(raw)
|
||||
shutil.copy2('out/include/KHR/khrplatform.h', '../kitty')
|
||||
open('../kitty/gl-wrapper.h', 'w').write(strip_trailing_whitespace(raw))
|
||||
raw = open('out/include/KHR/khrplatform.h', 'rb').read().decode('utf-8')
|
||||
open('../kitty/khrplatform.h', 'w').write(strip_trailing_whitespace(raw))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
6265
kitty/gl-wrapper.c
generated
6265
kitty/gl-wrapper.c
generated
File diff suppressed because it is too large
Load Diff
43
kitty/gl-wrapper.h
generated
43
kitty/gl-wrapper.h
generated
@ -1,7 +1,5 @@
|
||||
/*
|
||||
|
||||
OpenGL loader generated by glad 0.1.15a0 on Wed Nov 8 14:58:53 2017.
|
||||
|
||||
OpenGL loader generated by glad 0.1.20a0 on Fri May 4 18:11:55 2018.
|
||||
Language/Generator: C/C++ Debug
|
||||
Specification: gl
|
||||
APIs: gl=3.3
|
||||
@ -15,22 +13,17 @@
|
||||
Loader: True
|
||||
Local files: False
|
||||
Omit khrplatform: False
|
||||
|
||||
Commandline:
|
||||
--profile="core" --api="gl=3.3" --generator="c-debug" --spec="gl" --extensions="GL_ARB_copy_image,GL_ARB_multisample,GL_ARB_robustness,GL_ARB_texture_storage,GL_KHR_debug"
|
||||
Online:
|
||||
http://glad.dav1d.de/#profile=core&language=c-debug&specification=gl&loader=on&api=gl%3D3.3&extensions=GL_ARB_copy_image&extensions=GL_ARB_multisample&extensions=GL_ARB_robustness&extensions=GL_ARB_texture_storage&extensions=GL_KHR_debug
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __glad_h_
|
||||
#define __glad_h_
|
||||
|
||||
#ifdef __gl_h_
|
||||
#error OpenGL header already included, remove this include, glad already provides it
|
||||
#endif
|
||||
#define __gl_h_
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
@ -40,25 +33,20 @@
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct gladGLversionStruct {
|
||||
int major;
|
||||
int minor;
|
||||
};
|
||||
|
||||
typedef void* (* GLADloadproc)(const char *name);
|
||||
|
||||
#ifndef GLAPI
|
||||
# if defined(GLAD_GLAPI_EXPORT)
|
||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||
@ -84,17 +72,11 @@ typedef void* (* GLADloadproc)(const char *name);
|
||||
# define GLAPI extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
GLAPI struct gladGLversionStruct GLVersion;
|
||||
|
||||
GLAPI int gladLoadGL(void);
|
||||
|
||||
GLAPI int gladLoadGLLoader(GLADloadproc);
|
||||
|
||||
|
||||
#define GLAD_DEBUG
|
||||
typedef void (* GLADcallback)(const char *name, void *funcptr, int len_args, ...);
|
||||
|
||||
GLAPI void glad_set_pre_callback(GLADcallback cb);
|
||||
GLAPI void glad_set_post_callback(GLADcallback cb);
|
||||
#include <stddef.h>
|
||||
@ -1112,11 +1094,11 @@ typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap);
|
||||
GLAPI PFNGLENABLEPROC glad_glEnable;
|
||||
GLAPI PFNGLENABLEPROC glad_debug_glEnable;
|
||||
#define glEnable glad_debug_glEnable
|
||||
typedef void (APIENTRYP PFNGLFINISHPROC)();
|
||||
typedef void (APIENTRYP PFNGLFINISHPROC)(void);
|
||||
GLAPI PFNGLFINISHPROC glad_glFinish;
|
||||
GLAPI PFNGLFINISHPROC glad_debug_glFinish;
|
||||
#define glFinish glad_debug_glFinish
|
||||
typedef void (APIENTRYP PFNGLFLUSHPROC)();
|
||||
typedef void (APIENTRYP PFNGLFLUSHPROC)(void);
|
||||
GLAPI PFNGLFLUSHPROC glad_glFlush;
|
||||
GLAPI PFNGLFLUSHPROC glad_debug_glFlush;
|
||||
#define glFlush glad_debug_glFlush
|
||||
@ -1164,7 +1146,7 @@ typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data);
|
||||
GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev;
|
||||
GLAPI PFNGLGETDOUBLEVPROC glad_debug_glGetDoublev;
|
||||
#define glGetDoublev glad_debug_glGetDoublev
|
||||
typedef GLenum (APIENTRYP PFNGLGETERRORPROC)();
|
||||
typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void);
|
||||
GLAPI PFNGLGETERRORPROC glad_glGetError;
|
||||
GLAPI PFNGLGETERRORPROC glad_debug_glGetError;
|
||||
#define glGetError glad_debug_glGetError
|
||||
@ -1204,7 +1186,7 @@ typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap);
|
||||
GLAPI PFNGLISENABLEDPROC glad_glIsEnabled;
|
||||
GLAPI PFNGLISENABLEDPROC glad_debug_glIsEnabled;
|
||||
#define glIsEnabled glad_debug_glIsEnabled
|
||||
typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble near, GLdouble far);
|
||||
typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f);
|
||||
GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange;
|
||||
GLAPI PFNGLDEPTHRANGEPROC glad_debug_glDepthRange;
|
||||
#define glDepthRange glad_debug_glDepthRange
|
||||
@ -1484,7 +1466,7 @@ typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader);
|
||||
GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader;
|
||||
GLAPI PFNGLCOMPILESHADERPROC glad_debug_glCompileShader;
|
||||
#define glCompileShader glad_debug_glCompileShader
|
||||
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)();
|
||||
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void);
|
||||
GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
|
||||
GLAPI PFNGLCREATEPROGRAMPROC glad_debug_glCreateProgram;
|
||||
#define glCreateProgram glad_debug_glCreateProgram
|
||||
@ -1884,7 +1866,7 @@ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
|
||||
GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
|
||||
GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_debug_glBeginTransformFeedback;
|
||||
#define glBeginTransformFeedback glad_debug_glBeginTransformFeedback
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)();
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void);
|
||||
GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
|
||||
GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_debug_glEndTransformFeedback;
|
||||
#define glEndTransformFeedback glad_debug_glEndTransformFeedback
|
||||
@ -1912,7 +1894,7 @@ typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode)
|
||||
GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;
|
||||
GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_debug_glBeginConditionalRender;
|
||||
#define glBeginConditionalRender glad_debug_glBeginConditionalRender
|
||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)();
|
||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void);
|
||||
GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;
|
||||
GLAPI PFNGLENDCONDITIONALRENDERPROC glad_debug_glEndConditionalRender;
|
||||
#define glEndConditionalRender glad_debug_glEndConditionalRender
|
||||
@ -2678,7 +2660,7 @@ GLAPI PFNGLSAMPLECOVERAGEARBPROC glad_debug_glSampleCoverageARB;
|
||||
#ifndef GL_ARB_robustness
|
||||
#define GL_ARB_robustness 1
|
||||
GLAPI int GLAD_GL_ARB_robustness;
|
||||
typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC)();
|
||||
typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC)(void);
|
||||
GLAPI PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB;
|
||||
GLAPI PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_debug_glGetGraphicsResetStatusARB;
|
||||
#define glGetGraphicsResetStatusARB glad_debug_glGetGraphicsResetStatusARB
|
||||
@ -2798,7 +2780,7 @@ typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsiz
|
||||
GLAPI PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup;
|
||||
GLAPI PFNGLPUSHDEBUGGROUPPROC glad_debug_glPushDebugGroup;
|
||||
#define glPushDebugGroup glad_debug_glPushDebugGroup
|
||||
typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)();
|
||||
typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)(void);
|
||||
GLAPI PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup;
|
||||
GLAPI PFNGLPOPDEBUGGROUPPROC glad_debug_glPopDebugGroup;
|
||||
#define glPopDebugGroup glad_debug_glPopDebugGroup
|
||||
@ -2842,7 +2824,7 @@ typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC)(GLenum source, GLuint id, GL
|
||||
GLAPI PFNGLPUSHDEBUGGROUPKHRPROC glad_glPushDebugGroupKHR;
|
||||
GLAPI PFNGLPUSHDEBUGGROUPKHRPROC glad_debug_glPushDebugGroupKHR;
|
||||
#define glPushDebugGroupKHR glad_debug_glPushDebugGroupKHR
|
||||
typedef void (APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC)();
|
||||
typedef void (APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC)(void);
|
||||
GLAPI PFNGLPOPDEBUGGROUPKHRPROC glad_glPopDebugGroupKHR;
|
||||
GLAPI PFNGLPOPDEBUGGROUPKHRPROC glad_debug_glPopDebugGroupKHR;
|
||||
#define glPopDebugGroupKHR glad_debug_glPopDebugGroupKHR
|
||||
@ -2867,11 +2849,8 @@ GLAPI PFNGLGETPOINTERVKHRPROC glad_glGetPointervKHR;
|
||||
GLAPI PFNGLGETPOINTERVKHRPROC glad_debug_glGetPointervKHR;
|
||||
#define glGetPointervKHR glad_debug_glGetPointervKHR
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
int init_glad(GLADloadproc, int);
|
||||
|
43
kitty/khrplatform.h
generated
43
kitty/khrplatform.h
generated
@ -1,8 +1,7 @@
|
||||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
** Copyright (c) 2008-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
@ -23,21 +22,18 @@
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* $Revision: 32517 $ on $Date: 2016-03-11 02:41:19 -0800 (Fri, 11 Mar 2016) $
|
||||
* The master copy of khrplatform.h is maintained in the Khronos EGL
|
||||
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
|
||||
* The last semantic modification to khrplatform.h was at commit ID:
|
||||
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||
* "Khronos (general)" component "Registry".
|
||||
*
|
||||
* A predefined template which fills in some of the bug fields can be
|
||||
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||
* must create a Bugzilla login first.
|
||||
* Please submit changes by filing pull requests or issues on
|
||||
* the EGL Registry repository linked above.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
@ -91,7 +87,6 @@
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
@ -106,7 +101,6 @@
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
@ -119,7 +113,6 @@
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
@ -130,13 +123,10 @@
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
@ -147,9 +137,7 @@ typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
@ -160,9 +148,7 @@ typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
@ -172,9 +158,7 @@ typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
@ -189,9 +173,7 @@ typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
@ -199,9 +181,7 @@ typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
@ -212,10 +192,7 @@ typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
@ -223,7 +200,6 @@ 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;
|
||||
|
||||
/*
|
||||
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
@ -240,14 +216,12 @@ typedef unsigned long int khronos_uintptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
@ -261,14 +235,12 @@ typedef float khronos_float_t;
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
@ -280,5 +252,4 @@ typedef enum {
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
||||
|
Loading…
Reference in New Issue
Block a user