From 5d47a56a25c46b5d390354c2ca3d7656f5cb3cd7 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Mon, 25 Jan 2016 22:29:48 +1000 Subject: [PATCH] EGL fixup for void parameter lists, additional defines --- auto/bin/parse_xml.py | 5 ++++- auto/src/eglew_head.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/auto/bin/parse_xml.py b/auto/bin/parse_xml.py index 9270040..a9c1b4b 100755 --- a/auto/bin/parse_xml.py +++ b/auto/bin/parse_xml.py @@ -93,7 +93,10 @@ def writeExtension(f, name, extension, enums, commands): f.write('\t%s %s\n'%(e[0], e[1])) commands = [ (j, commands[j]) for j in extension[1] ] for c in sorted(commands): - f.write('\t%s %s (%s)\n'%(c[1][0], c[0], ', '.join( [ '%s %s'%(j[0], j[1]) for j in c[1][1] ] ))) + params = ', '.join( [ '%s %s'%(j[0], j[1]) for j in c[1][1] ] ) + if len(params)==0: + params = ' void ' + f.write('\t%s %s (%s)\n'%(c[1][0], c[0], params)) if __name__ == '__main__': diff --git a/auto/src/eglew_head.h b/auto/src/eglew_head.h index bb95b1a..adbeb71 100644 --- a/auto/src/eglew_head.h +++ b/auto/src/eglew_head.h @@ -66,6 +66,16 @@ typedef khronos_utime_nanoseconds_t EGLuint64NV; struct EGLClientPixmapHI; +#define EGL_DONT_CARE ((EGLint)-1) + +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_IMAGE ((EGLImage)0) +#define EGL_NO_SURFACE ((EGLSurface)0) +#define EGL_NO_SYNC ((EGLSync)0) + +#define EGL_UNKNOWN ((EGLint)-1) + #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);