Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ifdef to def

  • Loading branch information...
commit b568bfb1b1499bfda8be5bf637a584e96756c57b 1 parent 1bd8eae
@greggman greggman authored
View
8 include/GL/Regal.h
@@ -228,7 +228,7 @@ typedef void * CGSWindowID;
typedef void * CGSSurfaceID;
#endif // REGAL_SYS_OSX
-#if REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
@@ -244,7 +244,7 @@ typedef void * EGLDisplay;
typedef void * EGLSurface;
typedef void * EGLClientBuffer;
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
-#endif // REGAL_SYS_ANDROID
+#endif // REGAL_SYS_ANDROID | REGAL_STATIC_EGL
// TODO: make this automatic?
typedef void (*GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam);
@@ -30538,7 +30538,7 @@ REGAL_DECL CGLShareGroupObj REGAL_CALL CGLGetShareGroup(CGLContextObj ctx);
#endif /* REGAL_SYS_OSX */
-#if REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
#define EGL_NO_CONTEXT ((EGLContext)0)
#define EGL_NO_DISPLAY ((EGLDisplay)0)
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
@@ -30868,7 +30868,7 @@ REGAL_DECL EGLSurface REGAL_CALL eglCreatePbufferFromClientBuffer(EGLDisplay dpy
REGAL_DECL EGLenum REGAL_CALL eglQueryAPI(void);
#endif
-#endif /* REGAL_SYS_ANDROID */
+#endif /* REGAL_SYS_ANDROID | REGAL_STATIC_EGL */
#ifdef __cplusplus
}
View
14 scripts/Export.py
@@ -69,7 +69,7 @@
{ 'type' : 'void', 'member' : None, 'conditional' : None, 'ifdef' : None, 'formulae' : None }
]
-cond = { 'wgl' : 'REGAL_SYS_WGL', 'glx' : 'REGAL_SYS_GLX', 'cgl' : 'REGAL_SYS_OSX', 'egl' : 'REGAL_SYS_ANDROID' }
+cond = { 'wgl' : 'REGAL_SYS_WGL', 'glx' : 'REGAL_SYS_GLX', 'cgl' : 'REGAL_SYS_OSX', 'egl' : 'REGAL_SYS_ANDROID | REGAL_STATIC_EGL' }
regalLicense = '''
/*
@@ -986,7 +986,7 @@ def versionDeclareCode(apis, args):
for api in apis:
name = api.name.lower()
if name in cond:
- code += '#ifdef %s\n'%cond[name]
+ code += '#if %s\n'%cond[name]
for c in sorted(api.categories):
code += ' GLboolean %s : 1;\n' % (c.lower())
if name in cond:
@@ -1023,7 +1023,7 @@ def versionInitCode(apis, args):
for api in apis:
name = api.name.lower()
if name in cond:
- code += '#ifdef %s\n'%cond[name]
+ code += '#if %s\n'%cond[name]
for c in sorted(api.categories):
code += ' %s(false),\n' % (c.lower())
if name in cond:
@@ -1082,7 +1082,7 @@ def extensionStringCode(apis, args):
for api in apis:
name = api.name.lower()
if name in cond:
- code += '#ifdef %s\n'%cond[name]
+ code += '#if %s\n'%cond[name]
for c in sorted(api.categories):
code += ' %s = e.find("%s")!=e.end();\n' % (c.lower(),c)
if name in cond:
@@ -1103,7 +1103,7 @@ def getExtensionCode(apis, args):
for api in apis:
name = api.name.lower()
if name in cond:
- code += '#ifdef %s\n'%cond[name]
+ code += '#if %s\n'%cond[name]
for c in sorted(api.categories):
if c.startswith('GL_REGAL_') or c=='GL_EXT_debug_marker':
code += ' if (!strcmp(ext,"%s")) return true;\n' % (c)
@@ -1194,7 +1194,7 @@ def generateLookupSource(apis, args):
names.append(j.name)
if i.name in cond:
- code.append( '#ifdef %s'%cond[i.name] )
+ code.append( '#if %s'%cond[i.name] )
code.extend(pointerLookupByNameCode([ (j,j) for j in names ],("%s_Name"%i.name,"%s_Value"%i.name),valueCast = '(void *)(%s)'))
@@ -1269,7 +1269,7 @@ def generateLookupHeader(apis, args):
for i in apis:
if i.name in cond:
- code.append( '#ifdef %s'%cond[i.name] )
+ code.append( '#if %s'%cond[i.name] )
names = []
for j in i.functions:
View
4 src/regal/Regal.cpp
@@ -26792,7 +26792,7 @@ REGAL_DECL CGLError REGAL_CALL CGLUpdateContext(CGLContextObj ctx)
}
#endif /* REGAL_SYS_OSX */
-#if REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
/* EGL_VERSION_1_0 */
@@ -27447,7 +27447,7 @@ REGAL_DECL EGLBoolean REGAL_CALL eglWaitClient(void)
return ret;
}
-#endif /* REGAL_SYS_ANDROID */
+#endif /* REGAL_SYS_ANDROID | REGAL_STATIC_EGL */
#ifdef __cplusplus
}
View
12 src/regal/RegalContextInfo.cpp
@@ -327,7 +327,7 @@ ContextInfo::ContextInfo()
gl_sun_triangle_list(false),
gl_sun_vertex(false),
gl_win_swap_hint(false),
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
wgl_3dl_stereo_control(false),
wgl_amd_gpu_association(false),
wgl_arb_buffer_region(false),
@@ -360,7 +360,7 @@ ContextInfo::ContextInfo()
wgl_nv_video_output(false),
wgl_oml_sync_control(false),
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
glx_arb_create_context(false),
glx_arb_get_proc_address(false),
glx_ati_render_texture(false),
@@ -796,7 +796,7 @@ ContextInfo::init(const RegalContext &context)
gl_sun_vertex = e.find("GL_SUN_vertex")!=e.end();
gl_win_swap_hint = e.find("GL_WIN_swap_hint")!=e.end();
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
wgl_3dl_stereo_control = e.find("WGL_3DL_stereo_control")!=e.end();
wgl_amd_gpu_association = e.find("WGL_AMD_gpu_association")!=e.end();
wgl_arb_buffer_region = e.find("WGL_ARB_buffer_region")!=e.end();
@@ -830,7 +830,7 @@ ContextInfo::init(const RegalContext &context)
wgl_oml_sync_control = e.find("WGL_OML_sync_control")!=e.end();
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
glx_arb_create_context = e.find("GLX_ARB_create_context")!=e.end();
glx_arb_get_proc_address = e.find("GLX_ARB_get_proc_address")!=e.end();
glx_ati_render_texture = e.find("GLX_ATI_render_texture")!=e.end();
@@ -1115,7 +1115,7 @@ ContextInfo::getExtension(const char *ext) const
if (!strcmp(ext,"GL_SUN_vertex")) return gl_sun_vertex;
if (!strcmp(ext,"GL_WIN_swap_hint")) return gl_win_swap_hint;
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
if (!strcmp(ext,"WGL_3DL_stereo_control")) return wgl_3dl_stereo_control;
if (!strcmp(ext,"WGL_AMD_gpu_association")) return wgl_amd_gpu_association;
if (!strcmp(ext,"WGL_ARB_buffer_region")) return wgl_arb_buffer_region;
@@ -1149,7 +1149,7 @@ ContextInfo::getExtension(const char *ext) const
if (!strcmp(ext,"WGL_OML_sync_control")) return wgl_oml_sync_control;
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
if (!strcmp(ext,"GLX_ARB_create_context")) return glx_arb_create_context;
if (!strcmp(ext,"GLX_ARB_get_proc_address")) return glx_arb_get_proc_address;
if (!strcmp(ext,"GLX_ATI_render_texture")) return glx_ati_render_texture;
View
4 src/regal/RegalContextInfo.h
@@ -356,7 +356,7 @@ struct ContextInfo
GLboolean gl_sun_vertex : 1;
GLboolean gl_win_swap_hint : 1;
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
GLboolean wgl_3dl_stereo_control : 1;
GLboolean wgl_amd_gpu_association : 1;
GLboolean wgl_arb_buffer_region : 1;
@@ -390,7 +390,7 @@ struct ContextInfo
GLboolean wgl_oml_sync_control : 1;
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
GLboolean glx_arb_create_context : 1;
GLboolean glx_arb_get_proc_address : 1;
GLboolean glx_ati_render_texture : 1;
View
4 src/regal/RegalDispatch.h
@@ -576,7 +576,7 @@ struct DispatchTableGlobal {
CGLError (REGAL_CALL *CGLUpdateContext)(CGLContextObj ctx);
#endif // REGAL_SYS_OSX
-#if REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
// EGL_VERSION_1_0
@@ -620,7 +620,7 @@ struct DispatchTableGlobal {
EGLBoolean (REGAL_CALL *eglSurfaceAttrib)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
EGLBoolean (REGAL_CALL *eglSwapInterval)(EGLDisplay dpy, EGLint interval);
EGLBoolean (REGAL_CALL *eglWaitClient)(void);
-#endif // REGAL_SYS_ANDROID
+#endif // REGAL_SYS_ANDROID | REGAL_STATIC_EGL
};
View
8 src/regal/RegalLookup.cpp
@@ -7592,7 +7592,7 @@ const size_t gl_Offset[2512] = {
0
};
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
const char * const wgl_Name[144] = {
"wglAllocateMemoryNV",
"wglAssociateImageBufferEventsI3D",
@@ -8036,7 +8036,7 @@ const size_t wgl_Offset[144] = {
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
const char * const glx_Name[114] = {
"glXAllocateMemoryNV",
"glXBindChannelToWindowSGIX",
@@ -8390,7 +8390,7 @@ const size_t glx_Offset[114] = {
#endif
-#ifdef REGAL_SYS_OSX
+#if REGAL_SYS_OSX
const char * const cgl_Name[53] = {
"CGLChoosePixelFormat",
"CGLClearDrawable",
@@ -8561,7 +8561,7 @@ const size_t cgl_Offset[53] = {
#endif
-#ifdef REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
const char * const egl_Name[35] = {
"eglBindAPI",
"eglBindTexImage",
View
8 src/regal/RegalLookup.h
@@ -71,7 +71,7 @@ inline size_t gl_LookupOffset(const char *name)
return res ? gl_Offset[(size_t) (res - gl_Name)] : 0;
}
-#ifdef REGAL_SYS_WGL
+#if REGAL_SYS_WGL
extern const char * const wgl_Name[144];
extern const void *wgl_Value[144];
@@ -93,7 +93,7 @@ inline size_t wgl_LookupOffset(const char *name)
#endif
-#ifdef REGAL_SYS_GLX
+#if REGAL_SYS_GLX
extern const char * const glx_Name[114];
extern const void *glx_Value[114];
@@ -115,7 +115,7 @@ inline size_t glx_LookupOffset(const char *name)
#endif
-#ifdef REGAL_SYS_OSX
+#if REGAL_SYS_OSX
extern const char * const cgl_Name[53];
extern const void *cgl_Value[53];
@@ -137,7 +137,7 @@ inline size_t cgl_LookupOffset(const char *name)
#endif
-#ifdef REGAL_SYS_ANDROID
+#if REGAL_SYS_ANDROID | REGAL_STATIC_EGL
extern const char * const egl_Name[35];
extern const void *egl_Value[35];
Please sign in to comment.
Something went wrong with that request. Please try again.