Skip to content
Browse files

Don't abuse double-underscore prefix.

To avoid conflicts, as C++ standard reserved them for system libraries.
  • Loading branch information...
1 parent e32a797 commit 632a78d5c90941c896fa3c7156131f27c5a58b24 @jrfonseca jrfonseca committed Apr 19, 2012
View
9 DEVELOPMENT.markdown
@@ -1,8 +1,8 @@
Coding Style
============
-XXX: These are mostly guidelines for new code, as some of existing hasn't been
-updated to these conventions yet.
+These are guidelines for new code. Some of existing hasn't been updated to
+these conventions yet.
Whitespace (all languages):
@@ -24,6 +24,9 @@ Naming convention:
* `UPPER_CASE` for #defines
+ * single underscore prefix for variables/functions in automatically generated
+ code
+
C++:
* enclose single statement `if` clauses in { }, specially for automatically
@@ -35,7 +38,7 @@ C++:
CMake:
- * `lower_case`
+ * `lower_case` commands
* space between ( and precedent name
View
26 dispatch/dispatch.py
@@ -38,11 +38,11 @@
def function_pointer_type(function):
- return '__PFN' + function.name.upper()
+ return 'PFN_' + function.name.upper()
def function_pointer_value(function):
- return '__' + function.name + '_ptr'
+ return '_' + function.name + '_ptr'
class Dispatcher:
@@ -51,10 +51,10 @@ def header(self):
# Must be implemented by derived classes, which should define, declare,
# or implement something like:
#
- # typedef void (*__PROC)(void);
+ # typedef void (*_PROC)(void);
#
- # static __PROC __getPublicProcAddress(const char *name);
- # static __PROC __getPrivateProcAddress(const char *name);
+ # static _PROC _getPublicProcAddress(const char *name);
+ # static _PROC _getPrivateProcAddress(const char *name);
#
raise NotImplementedError
@@ -67,7 +67,7 @@ def dispatch_api(self, api):
# functions
print '#ifdef RETRACE'
for function in api.functions:
- print '#define %s __%s' % (function.name, function.name)
+ print '#define %s _%s' % (function.name, function.name)
print '#endif /* RETRACE */'
print
@@ -77,8 +77,8 @@ def invokeFunction(self, function):
print 'typedef ' + function.prototype('* %s' % ptype) + ';'
print 'static %s %s = NULL;' % (ptype, pvalue)
print
- print 'static inline ' + function.prototype('__' + function.name) + ' {'
- print ' const char *__name = "%s";' % function.name
+ print 'static inline ' + function.prototype('_' + function.name) + ' {'
+ print ' const char *_name = "%s";' % function.name
if function.type is stdapi.Void:
ret = ''
else:
@@ -95,27 +95,27 @@ def get_true_pointer(self, function):
ptype = function_pointer_type(function)
pvalue = function_pointer_value(function)
if self.isFunctionPublic(function):
- get_proc_address = '__getPublicProcAddress'
+ get_proc_address = '_getPublicProcAddress'
else:
- get_proc_address = '__getPrivateProcAddress'
+ get_proc_address = '_getPrivateProcAddress'
print ' if (!%s) {' % (pvalue,)
- print ' %s = (%s)%s(__name);' % (pvalue, ptype, get_proc_address)
+ print ' %s = (%s)%s(_name);' % (pvalue, ptype, get_proc_address)
print ' if (!%s) {' % (pvalue,)
self.failFunction(function)
print ' }'
print ' }'
def failFunction(self, function):
if function.type is stdapi.Void or function.fail is not None:
- print r' os::log("warning: ignoring call to unavailable function %s\n", __name);'
+ print r' os::log("warning: ignoring call to unavailable function %s\n", _name);'
if function.type is stdapi.Void:
assert function.fail is None
print ' return;'
else:
assert function.fail is not None
print ' return %s;' % function.fail
else:
- print r' os::log("error: unavailable function %s\n", __name);'
+ print r' os::log("error: unavailable function %s\n", _name);'
print r' os::abort();'
View
2 dispatch/eglimports.hpp
@@ -80,7 +80,7 @@ typedef int32_t GLclampx;
// avoid conflict with GL_EXT_framebuffer_multisample
#define GL_EXT_multisampled_render_to_texture
-#undef __glext_h_
+#undef _glext_h_
#include "GLES/glext.h"
View
8 dispatch/glproc.py
@@ -494,13 +494,13 @@ class GlDispatcher(Dispatcher):
def header(self):
print '''
#if defined(_WIN32)
-extern HINSTANCE __libGlHandle;
+extern HINSTANCE _libGlHandle;
#else
-extern void * __libGlHandle;
+extern void * _libGlHandle;
#endif
-void * __getPublicProcAddress(const char *procName);
-void * __getPrivateProcAddress(const char *procName);
+void * _getPublicProcAddress(const char *procName);
+void * _getPrivateProcAddress(const char *procName);
'''
def isFunctionPublic(self, function):
View
12 dispatch/glproc_egl.cpp
@@ -40,9 +40,9 @@
* XXX: Not really used yet.
*/
#if defined(_WIN32)
-HINSTANCE __libGlHandle = NULL;
+HINSTANCE _libGlHandle = NULL;
#else
-void *__libGlHandle = NULL;
+void *_libGlHandle = NULL;
#endif
@@ -71,7 +71,7 @@ void *__libGlHandle = NULL;
* for quering via dlsym(RTLD_NEXT, ...).
*/
void *
-__getPublicProcAddress(const char *procName)
+_getPublicProcAddress(const char *procName)
{
#if defined(ANDROID)
/*
@@ -135,14 +135,14 @@ __getPublicProcAddress(const char *procName)
* eglGetProcAddress to mitigate that.
*/
void *
-__getPrivateProcAddress(const char *procName)
+_getPrivateProcAddress(const char *procName)
{
void *proc;
- proc = __getPublicProcAddress(procName);
+ proc = _getPublicProcAddress(procName);
if (!proc &&
((procName[0] == 'e' && procName[1] == 'g' && procName[2] == 'l') ||
(procName[0] == 'g' && procName[1] == 'l'))) {
- proc = (void *) __eglGetProcAddress(procName);
+ proc = (void *) _eglGetProcAddress(procName);
}
return proc;
View
58 dispatch/glproc_gl.cpp
@@ -37,19 +37,19 @@
* Handle to the true OpenGL library.
*/
#if defined(_WIN32)
-HINSTANCE __libGlHandle = NULL;
+HINSTANCE _libGlHandle = NULL;
#else
-void *__libGlHandle = NULL;
+void *_libGlHandle = NULL;
#endif
#if defined(_WIN32)
void *
-__getPublicProcAddress(const char *procName)
+_getPublicProcAddress(const char *procName)
{
- if (!__libGlHandle) {
+ if (!_libGlHandle) {
char szDll[MAX_PATH] = {0};
if (!GetSystemDirectoryA(szDll, MAX_PATH)) {
@@ -58,20 +58,20 @@ __getPublicProcAddress(const char *procName)
strcat(szDll, "\\\\opengl32.dll");
- __libGlHandle = LoadLibraryA(szDll);
- if (!__libGlHandle) {
+ _libGlHandle = LoadLibraryA(szDll);
+ if (!_libGlHandle) {
os::log("apitrace: error: couldn't load %s\n", szDll);
return NULL;
}
}
- return (void *)GetProcAddress(__libGlHandle, procName);
+ return (void *)GetProcAddress(_libGlHandle, procName);
}
void *
-__getPrivateProcAddress(const char *procName) {
- return (void *)__wglGetProcAddress(procName);
+_getPrivateProcAddress(const char *procName) {
+ return (void *)_wglGetProcAddress(procName);
}
@@ -87,11 +87,11 @@ static const char *libgl_filename = "/System/Library/Frameworks/OpenGL.framework
/*
* Lookup a libGL symbol
*/
-void * __libgl_sym(const char *symbol)
+void * _libgl_sym(const char *symbol)
{
void *result;
- if (!__libGlHandle) {
+ if (!_libGlHandle) {
/*
* Unfortunately we can't just dlopen the true dynamic library because
* DYLD_LIBRARY_PATH/DYLD_FRAMEWORK_PATH take precedence, even for
@@ -103,19 +103,19 @@ void * __libgl_sym(const char *symbol)
if (mktemp(temp_filename) != NULL) {
if (symlink(libgl_filename, temp_filename) == 0) {
- __libGlHandle = dlopen(temp_filename, RTLD_LOCAL | RTLD_NOW | RTLD_FIRST);
+ _libGlHandle = dlopen(temp_filename, RTLD_LOCAL | RTLD_NOW | RTLD_FIRST);
remove(temp_filename);
}
}
- if (!__libGlHandle) {
+ if (!_libGlHandle) {
os::log("apitrace: error: couldn't load %s\n", libgl_filename);
os::abort();
return NULL;
}
}
- result = dlsym(__libGlHandle, symbol);
+ result = dlsym(_libGlHandle, symbol);
#if 0
if (result && result == dlsym(RTLD_SELF, symbol)) {
@@ -130,15 +130,15 @@ void * __libgl_sym(const char *symbol)
void *
-__getPublicProcAddress(const char *procName)
+_getPublicProcAddress(const char *procName)
{
- return __libgl_sym(procName);
+ return _libgl_sym(procName);
}
void *
-__getPrivateProcAddress(const char *procName)
+_getPrivateProcAddress(const char *procName)
{
- return __libgl_sym(procName);
+ return _libgl_sym(procName);
}
@@ -149,7 +149,7 @@ __getPrivateProcAddress(const char *procName)
* Invoke the true dlopen() function.
*/
static void *
-__dlopen(const char *filename, int flag)
+_dlopen(const char *filename, int flag)
{
typedef void * (*PFNDLOPEN)(const char *, int);
static PFNDLOPEN dlopen_ptr = NULL;
@@ -169,11 +169,11 @@ __dlopen(const char *filename, int flag)
/*
* Lookup a libGL symbol
*/
-void * __libgl_sym(const char *symbol)
+void * _libgl_sym(const char *symbol)
{
void *result;
- if (!__libGlHandle) {
+ if (!_libGlHandle) {
/*
* The app doesn't directly link against libGL.so, nor does it directly
* dlopen it. So we have to load it ourselves.
@@ -188,7 +188,7 @@ void * __libgl_sym(const char *symbol)
result = dlsym(RTLD_NEXT, symbol);
if (result) {
- __libGlHandle = RTLD_NEXT;
+ _libGlHandle = RTLD_NEXT;
return result;
}
@@ -202,27 +202,27 @@ void * __libgl_sym(const char *symbol)
* exposes symbols to it.
*/
- __libGlHandle = __dlopen(libgl_filename, RTLD_GLOBAL | RTLD_LAZY);
- if (!__libGlHandle) {
+ _libGlHandle = _dlopen(libgl_filename, RTLD_GLOBAL | RTLD_LAZY);
+ if (!_libGlHandle) {
os::log("apitrace: error: couldn't find libGL.so\n");
return NULL;
}
}
- return dlsym(__libGlHandle, symbol);
+ return dlsym(_libGlHandle, symbol);
}
void *
-__getPublicProcAddress(const char *procName)
+_getPublicProcAddress(const char *procName)
{
- return __libgl_sym(procName);
+ return _libgl_sym(procName);
}
void *
-__getPrivateProcAddress(const char *procName)
+_getPrivateProcAddress(const char *procName)
{
- return (void *)__glXGetProcAddressARB((const GLubyte *)procName);
+ return (void *)_glXGetProcAddressARB((const GLubyte *)procName);
}
View
214 helpers/glsize.hpp
@@ -42,7 +42,7 @@
static inline size_t
-__gl_type_size(GLenum type)
+_gl_type_size(GLenum type)
{
switch (type) {
case GL_BOOL:
@@ -71,7 +71,7 @@ __gl_type_size(GLenum type)
}
static inline void
-__gl_uniform_size(GLenum type, GLenum &elemType, GLint &numElems) {
+_gl_uniform_size(GLenum type, GLenum &elemType, GLint &numElems) {
switch (type) {
case GL_FLOAT:
elemType = GL_FLOAT;
@@ -277,59 +277,59 @@ __gl_uniform_size(GLenum type, GLenum &elemType, GLint &numElems) {
}
static inline size_t
-__glArrayPointer_size(GLint size, GLenum type, GLsizei stride, GLsizei maxIndex)
+_glArrayPointer_size(GLint size, GLenum type, GLsizei stride, GLsizei maxIndex)
{
- size_t elementSize = size*__gl_type_size(type);
+ size_t elementSize = size*_gl_type_size(type);
if (!stride) {
stride = (GLsizei)elementSize;
}
return stride*maxIndex + elementSize;
}
-#define __glVertexPointer_size(size, type, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glNormalPointer_size(type, stride, maxIndex) __glArrayPointer_size(3, type, stride, maxIndex)
-#define __glColorPointer_size(size, type, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glIndexPointer_size(type, stride, maxIndex) __glArrayPointer_size(1, type, stride, maxIndex)
-#define __glTexCoordPointer_size(size, type, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glEdgeFlagPointer_size(stride, maxIndex) __glArrayPointer_size(1, GL_BOOL, stride, maxIndex)
-#define __glFogCoordPointer_size(type, stride, maxIndex) __glArrayPointer_size(1, type, stride, maxIndex)
-#define __glSecondaryColorPointer_size(size, type, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glVertexAttribPointer_size(size, type, normalized, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glVertexAttribPointerARB_size(size, type, normalized, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
-#define __glVertexAttribPointerNV_size(size, type, stride, maxIndex) __glArrayPointer_size(size, type, stride, maxIndex)
+#define _glVertexPointer_size(size, type, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glNormalPointer_size(type, stride, maxIndex) _glArrayPointer_size(3, type, stride, maxIndex)
+#define _glColorPointer_size(size, type, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glIndexPointer_size(type, stride, maxIndex) _glArrayPointer_size(1, type, stride, maxIndex)
+#define _glTexCoordPointer_size(size, type, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glEdgeFlagPointer_size(stride, maxIndex) _glArrayPointer_size(1, GL_BOOL, stride, maxIndex)
+#define _glFogCoordPointer_size(type, stride, maxIndex) _glArrayPointer_size(1, type, stride, maxIndex)
+#define _glSecondaryColorPointer_size(size, type, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glVertexAttribPointer_size(size, type, normalized, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glVertexAttribPointerARB_size(size, type, normalized, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
+#define _glVertexAttribPointerNV_size(size, type, stride, maxIndex) _glArrayPointer_size(size, type, stride, maxIndex)
static inline GLuint
-__glDrawArrays_maxindex(GLint first, GLsizei count)
+_glDrawArrays_maxindex(GLint first, GLsizei count)
{
if (!count) {
return 0;
}
return first + count - 1;
}
-#define __glDrawArraysEXT_maxindex __glDrawArrays_maxindex
+#define _glDrawArraysEXT_maxindex _glDrawArrays_maxindex
static inline GLuint
-__glDrawElementsBaseVertex_maxindex(GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+_glDrawElementsBaseVertex_maxindex(GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
{
GLvoid *temp = 0;
- GLint __element_array_buffer = 0;
+ GLint element_array_buffer = 0;
if (!count) {
return 0;
}
- __glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &__element_array_buffer);
- if (__element_array_buffer) {
+ _glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &element_array_buffer);
+ if (element_array_buffer) {
// Read indices from index buffer object
GLintptr offset = (GLintptr)indices;
- GLsizeiptr size = count*__gl_type_size(type);
+ GLsizeiptr size = count*_gl_type_size(type);
GLvoid *temp = malloc(size);
if (!temp) {
return 0;
}
memset(temp, 0, size);
- __glGetBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, size, temp);
+ _glGetBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, size, temp);
indices = temp;
} else {
if (!indices) {
@@ -364,7 +364,7 @@ __glDrawElementsBaseVertex_maxindex(GLsizei count, GLenum type, const GLvoid *in
os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, type);
}
- if (__element_array_buffer) {
+ if (element_array_buffer) {
free(temp);
}
@@ -373,85 +373,85 @@ __glDrawElementsBaseVertex_maxindex(GLsizei count, GLenum type, const GLvoid *in
return maxindex;
}
-#define __glDrawRangeElementsBaseVertex_maxindex(start, end, count, type, indices, basevertex) __glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
+#define _glDrawRangeElementsBaseVertex_maxindex(start, end, count, type, indices, basevertex) _glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
-#define __glDrawElements_maxindex(count, type, indices) __glDrawElementsBaseVertex_maxindex(count, type, indices, 0);
-#define __glDrawRangeElements_maxindex(start, end, count, type, indices) __glDrawElements_maxindex(count, type, indices)
-#define __glDrawRangeElementsEXT_maxindex __glDrawRangeElements_maxindex
+#define _glDrawElements_maxindex(count, type, indices) _glDrawElementsBaseVertex_maxindex(count, type, indices, 0);
+#define _glDrawRangeElements_maxindex(start, end, count, type, indices) _glDrawElements_maxindex(count, type, indices)
+#define _glDrawRangeElementsEXT_maxindex _glDrawRangeElements_maxindex
/* FIXME take in consideration instancing */
-#define __glDrawArraysInstanced_maxindex(first, count, primcount) __glDrawArrays_maxindex(first, count)
-#define __glDrawElementsInstanced_maxindex(count, type, indices, primcount) __glDrawElements_maxindex(count, type, indices)
-#define __glDrawElementsInstancedBaseVertex_maxindex(count, type, indices, primcount, basevertex) __glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
-#define __glDrawRangeElementsInstanced_maxindex(start, end, count, type, indices, primcount) __glDrawRangeElements_maxindex(start, end, count, type, indices)
-#define __glDrawRangeElementsInstancedBaseVertex_maxindex(start, end, count, type, indices, primcount, basevertex) __glDrawRangeElementsBaseVertex_maxindex(start, end, count, type, indices, basevertex)
+#define _glDrawArraysInstanced_maxindex(first, count, primcount) _glDrawArrays_maxindex(first, count)
+#define _glDrawElementsInstanced_maxindex(count, type, indices, primcount) _glDrawElements_maxindex(count, type, indices)
+#define _glDrawElementsInstancedBaseVertex_maxindex(count, type, indices, primcount, basevertex) _glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
+#define _glDrawRangeElementsInstanced_maxindex(start, end, count, type, indices, primcount) _glDrawRangeElements_maxindex(start, end, count, type, indices)
+#define _glDrawRangeElementsInstancedBaseVertex_maxindex(start, end, count, type, indices, primcount, basevertex) _glDrawRangeElementsBaseVertex_maxindex(start, end, count, type, indices, basevertex)
-#define __glDrawArraysInstancedBaseInstance_maxindex(first, count, primcount, baseinstance) __glDrawArrays_maxindex(first, count)
-#define __glDrawElementsInstancedBaseInstance_maxindex(count, type, indices, primcount, baseinstance) __glDrawElements_maxindex(count, type, indices)
-#define __glDrawElementsInstancedBaseVertexBaseInstance_maxindex(count, type, indices, primcount, basevertex, baseinstance) __glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
+#define _glDrawArraysInstancedBaseInstance_maxindex(first, count, primcount, baseinstance) _glDrawArrays_maxindex(first, count)
+#define _glDrawElementsInstancedBaseInstance_maxindex(count, type, indices, primcount, baseinstance) _glDrawElements_maxindex(count, type, indices)
+#define _glDrawElementsInstancedBaseVertexBaseInstance_maxindex(count, type, indices, primcount, basevertex, baseinstance) _glDrawElementsBaseVertex_maxindex(count, type, indices, basevertex)
-#define __glDrawArraysInstancedARB_maxindex __glDrawArraysInstanced_maxindex
-#define __glDrawElementsInstancedARB_maxindex __glDrawElementsInstanced_maxindex
-#define __glDrawArraysInstancedEXT_maxindex __glDrawArraysInstanced_maxindex
-#define __glDrawElementsInstancedEXT_maxindex __glDrawElementsInstanced_maxindex
+#define _glDrawArraysInstancedARB_maxindex _glDrawArraysInstanced_maxindex
+#define _glDrawElementsInstancedARB_maxindex _glDrawElementsInstanced_maxindex
+#define _glDrawArraysInstancedEXT_maxindex _glDrawArraysInstanced_maxindex
+#define _glDrawElementsInstancedEXT_maxindex _glDrawElementsInstanced_maxindex
static inline GLuint
-__glDrawArraysIndirect_maxindex(const GLvoid *indirect) {
+_glDrawArraysIndirect_maxindex(const GLvoid *indirect) {
os::log("apitrace: warning: %s: unsupported\n", __FUNCTION__);
return 0;
}
static inline GLuint
-__glDrawElementsIndirect_maxindex(GLenum type, const GLvoid *indirect) {
+_glDrawElementsIndirect_maxindex(GLenum type, const GLvoid *indirect) {
os::log("apitrace: warning: %s: unsupported\n", __FUNCTION__);
return 0;
}
static inline GLuint
-__glMultiDrawArrays_maxindex(const GLint *first, const GLsizei *count, GLsizei primcount) {
+_glMultiDrawArrays_maxindex(const GLint *first, const GLsizei *count, GLsizei primcount) {
GLuint maxindex = 0;
for (GLsizei prim = 0; prim < primcount; ++prim) {
- GLuint maxindex_prim = __glDrawArrays_maxindex(first[prim], count[prim]);
+ GLuint maxindex_prim = _glDrawArrays_maxindex(first[prim], count[prim]);
maxindex = std::max(maxindex, maxindex_prim);
}
return maxindex;
}
static inline GLuint
-__glMultiDrawElements_maxindex(const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
+_glMultiDrawElements_maxindex(const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
GLuint maxindex = 0;
for (GLsizei prim = 0; prim < primcount; ++prim) {
- GLuint maxindex_prim = __glDrawElements_maxindex(count[prim], type, indices[prim]);
+ GLuint maxindex_prim = _glDrawElements_maxindex(count[prim], type, indices[prim]);
maxindex = std::max(maxindex, maxindex_prim);
}
return maxindex;
}
static inline GLuint
-__glMultiDrawElementsBaseVertex_maxindex(const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint * basevertex) {
+_glMultiDrawElementsBaseVertex_maxindex(const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint * basevertex) {
GLuint maxindex = 0;
for (GLsizei prim = 0; prim < primcount; ++prim) {
- GLuint maxindex_prim = __glDrawElementsBaseVertex_maxindex(count[prim], type, indices[prim], basevertex[prim]);
+ GLuint maxindex_prim = _glDrawElementsBaseVertex_maxindex(count[prim], type, indices[prim], basevertex[prim]);
maxindex = std::max(maxindex, maxindex_prim);
}
return maxindex;
}
-#define __glMultiDrawArraysEXT_maxindex __glMultiDrawArrays_maxindex
-#define __glMultiDrawElementsEXT_maxindex __glMultiDrawElements_maxindex
+#define _glMultiDrawArraysEXT_maxindex _glMultiDrawArrays_maxindex
+#define _glMultiDrawElementsEXT_maxindex _glMultiDrawElements_maxindex
-#define __glMultiModeDrawArraysIBM_maxindex(first, count, primcount, modestride) __glMultiDrawArrays_maxindex(first, count, primcount)
-#define __glMultiModeDrawElementsIBM_maxindex(count, type, indices, primcount, modestride) __glMultiDrawElements_maxindex(count, type, (const GLvoid **)indices, primcount)
+#define _glMultiModeDrawArraysIBM_maxindex(first, count, primcount, modestride) _glMultiDrawArrays_maxindex(first, count, primcount)
+#define _glMultiModeDrawElementsIBM_maxindex(count, type, indices, primcount, modestride) _glMultiDrawElements_maxindex(count, type, (const GLvoid **)indices, primcount)
static inline size_t
-__glCallLists_size(GLsizei n, GLenum type)
+_glCallLists_size(GLsizei n, GLenum type)
{
- return n*__gl_type_size(type);
+ return n*_gl_type_size(type);
}
static inline size_t
-__glMap1d_size(GLenum target, GLint stride, GLint order)
+_glMap1d_size(GLenum target, GLint stride, GLint order)
{
if (order < 1) {
return 0;
@@ -488,10 +488,10 @@ __glMap1d_size(GLenum target, GLint stride, GLint order)
return channels + stride * (order - 1);
}
-#define __glMap1f_size __glMap1d_size
+#define _glMap1f_size _glMap1d_size
static inline size_t
-__glMap2d_size(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder)
+_glMap2d_size(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder)
{
if (uorder < 1 || vorder < 1) {
return 0;
@@ -530,10 +530,10 @@ __glMap2d_size(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint
vstride * (vorder - 1);
}
-#define __glMap2f_size __glMap2d_size
+#define _glMap2f_size _glMap2d_size
static inline unsigned
-__gl_format_channels(GLenum format) {
+_gl_format_channels(GLenum format) {
switch (format) {
case GL_COLOR_INDEX:
case GL_RED:
@@ -582,8 +582,8 @@ _align(X x, Y y) {
}
static inline size_t
-__gl_image_size(GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth, GLboolean has_unpack_subimage) {
- unsigned num_channels = __gl_format_channels(format);
+_gl_image_size(GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth, GLboolean has_unpack_subimage) {
+ unsigned num_channels = _gl_format_channels(format);
unsigned bits_per_pixel;
switch (type) {
@@ -645,13 +645,13 @@ __gl_image_size(GLenum format, GLenum type, GLsizei width, GLsizei height, GLsiz
GLint skip_pixels = 0;
GLint skip_images = 0;
- __glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+ _glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
if (has_unpack_subimage) {
- __glGetIntegerv(GL_UNPACK_ROW_LENGTH, &row_length);
- __glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, &image_height);
- __glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skip_rows);
- __glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skip_pixels);
- __glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &skip_images);
+ _glGetIntegerv(GL_UNPACK_ROW_LENGTH, &row_length);
+ _glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, &image_height);
+ _glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skip_rows);
+ _glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skip_pixels);
+ _glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &skip_images);
}
if (row_length <= 0) {
@@ -685,46 +685,46 @@ __gl_image_size(GLenum format, GLenum type, GLsizei width, GLsizei height, GLsiz
}
// note that can_unpack_subimage() is generated by gltrace.py
-#define __glTexImage3D_size(format, type, width, height, depth) __gl_image_size(format, type, width, height, depth, can_unpack_subimage())
-#define __glTexImage2D_size(format, type, width, height) __gl_image_size(format, type, width, height, 1, can_unpack_subimage())
-#define __glTexImage1D_size(format, type, width) __gl_image_size(format, type, width, 1, 1, can_unpack_subimage())
-
-#define __glTexSubImage3D_size(format, type, width, height, depth) __glTexImage3D_size(format, type, width, height, depth)
-#define __glTexSubImage2D_size(format, type, width, height) __glTexImage2D_size(format, type, width, height)
-#define __glTexSubImage1D_size(format, type, width) __glTexImage1D_size(format, type, width)
-
-#define __glTexImage3DEXT_size __glTexImage3D_size
-#define __glTexImage2DEXT_size __glTexImage2D_size
-#define __glTexImage1DEXT_size __glTexImage1D_size
-#define __glTexSubImage3DEXT_size __glTexSubImage3D_size
-#define __glTexSubImage2DEXT_size __glTexSubImage2D_size
-#define __glTexSubImage1DEXT_size __glTexSubImage1D_size
-
-#define __glTextureImage3DEXT_size __glTexImage3D_size
-#define __glTextureImage2DEXT_size __glTexImage2D_size
-#define __glTextureImage1DEXT_size __glTexImage1D_size
-#define __glTextureSubImage3DEXT_size __glTexSubImage3D_size
-#define __glTextureSubImage2DEXT_size __glTexSubImage2D_size
-#define __glTextureSubImage1DEXT_size __glTexSubImage1D_size
-
-#define __glMultiTexImage3DEXT_size __glTexImage3D_size
-#define __glMultiTexImage2DEXT_size __glTexImage2D_size
-#define __glMultiTexImage1DEXT_size __glTexImage1D_size
-#define __glMultiTexSubImage3DEXT_size __glTexSubImage3D_size
-#define __glMultiTexSubImage2DEXT_size __glTexSubImage2D_size
-#define __glMultiTexSubImage1DEXT_size __glTexSubImage1D_size
-
-#define __glDrawPixels_size(format, type, width, height) __glTexImage2D_size(format, type, width, height)
-#define __glConvolutionFilter1D_size(format, type, width) __glTexImage1D_size(format, type, width)
-#define __glConvolutionFilter2D_size(format, type, width, height) __glTexImage2D_size(format, type, width, height)
-#define __glColorTable_size(format, type, width) __glTexImage1D_size(format, type, width)
-#define __glColorSubTable_size(format, type, count) __glColorTable_size(format, type, count)
-
-#define __glBitmap_size(width, height) __glTexImage2D_size(GL_COLOR_INDEX, GL_BITMAP, width, height)
-#define __glPolygonStipple_size() __glBitmap_size(32, 32)
+#define _glTexImage3D_size(format, type, width, height, depth) _gl_image_size(format, type, width, height, depth, can_unpack_subimage())
+#define _glTexImage2D_size(format, type, width, height) _gl_image_size(format, type, width, height, 1, can_unpack_subimage())
+#define _glTexImage1D_size(format, type, width) _gl_image_size(format, type, width, 1, 1, can_unpack_subimage())
+
+#define _glTexSubImage3D_size(format, type, width, height, depth) _glTexImage3D_size(format, type, width, height, depth)
+#define _glTexSubImage2D_size(format, type, width, height) _glTexImage2D_size(format, type, width, height)
+#define _glTexSubImage1D_size(format, type, width) _glTexImage1D_size(format, type, width)
+
+#define _glTexImage3DEXT_size _glTexImage3D_size
+#define _glTexImage2DEXT_size _glTexImage2D_size
+#define _glTexImage1DEXT_size _glTexImage1D_size
+#define _glTexSubImage3DEXT_size _glTexSubImage3D_size
+#define _glTexSubImage2DEXT_size _glTexSubImage2D_size
+#define _glTexSubImage1DEXT_size _glTexSubImage1D_size
+
+#define _glTextureImage3DEXT_size _glTexImage3D_size
+#define _glTextureImage2DEXT_size _glTexImage2D_size
+#define _glTextureImage1DEXT_size _glTexImage1D_size
+#define _glTextureSubImage3DEXT_size _glTexSubImage3D_size
+#define _glTextureSubImage2DEXT_size _glTexSubImage2D_size
+#define _glTextureSubImage1DEXT_size _glTexSubImage1D_size
+
+#define _glMultiTexImage3DEXT_size _glTexImage3D_size
+#define _glMultiTexImage2DEXT_size _glTexImage2D_size
+#define _glMultiTexImage1DEXT_size _glTexImage1D_size
+#define _glMultiTexSubImage3DEXT_size _glTexSubImage3D_size
+#define _glMultiTexSubImage2DEXT_size _glTexSubImage2D_size
+#define _glMultiTexSubImage1DEXT_size _glTexSubImage1D_size
+
+#define _glDrawPixels_size(format, type, width, height) _glTexImage2D_size(format, type, width, height)
+#define _glConvolutionFilter1D_size(format, type, width) _glTexImage1D_size(format, type, width)
+#define _glConvolutionFilter2D_size(format, type, width, height) _glTexImage2D_size(format, type, width, height)
+#define _glColorTable_size(format, type, width) _glTexImage1D_size(format, type, width)
+#define _glColorSubTable_size(format, type, count) _glColorTable_size(format, type, count)
+
+#define _glBitmap_size(width, height) _glTexImage2D_size(GL_COLOR_INDEX, GL_BITMAP, width, height)
+#define _glPolygonStipple_size() _glBitmap_size(32, 32)
static inline size_t
-__glClearBuffer_size(GLenum buffer)
+_glClearBuffer_size(GLenum buffer)
{
switch (buffer) {
case GL_COLOR:
@@ -748,7 +748,7 @@ __glClearBuffer_size(GLenum buffer)
*/
template<class T>
static inline size_t
-__AttribList_size(const T *pAttribList, const T terminator = static_cast<T>(0))
+_AttribList_size(const T *pAttribList, const T terminator = static_cast<T>(0))
{
size_t size = 0;
@@ -767,7 +767,7 @@ __AttribList_size(const T *pAttribList, const T terminator = static_cast<T>(0))
*/
template<class T>
static inline size_t
-__AttribPairList_size(const T *pAttribList, const T terminator = static_cast<T>(0))
+_AttribPairList_size(const T *pAttribList, const T terminator = static_cast<T>(0))
{
size_t size = 0;
View
2 retrace/d3dretrace.py
@@ -50,7 +50,7 @@ def invokeInterfaceMethod(self, interface, method):
Retracer.invokeInterfaceMethod(self, interface, method)
if str(method.type) == 'HRESULT':
- print r' if (__result != S_OK) {'
+ print r' if (_result != S_OK) {'
print r' retrace::warning(call) << "failed\n";'
print r' }'
View
2 retrace/dllretrace.py
@@ -35,7 +35,7 @@ def retraceApi(self, api):
static HINSTANCE g_hDll = NULL;
static PROC
-__getPublicProcAddress(LPCSTR lpProcName)
+_getPublicProcAddress(LPCSTR lpProcName)
{
if (!g_hDll) {
char szDll[MAX_PATH] = {0};
View
36 retrace/glretrace.py
@@ -181,26 +181,26 @@ def retraceFunctionBody(self, function):
print ' if (retrace::parser.version < 1) {'
if is_array_pointer or is_draw_array:
- print ' GLint __array_buffer = 0;'
- print ' glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &__array_buffer);'
- print ' if (!__array_buffer) {'
+ print ' GLint _array_buffer = 0;'
+ print ' glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &_array_buffer);'
+ print ' if (!_array_buffer) {'
self.failFunction(function)
print ' }'
if is_draw_elements:
- print ' GLint __element_array_buffer = 0;'
- print ' glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &__element_array_buffer);'
- print ' if (!__element_array_buffer) {'
+ print ' GLint _element_array_buffer = 0;'
+ print ' glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &_element_array_buffer);'
+ print ' if (!_element_array_buffer) {'
self.failFunction(function)
print ' }'
print ' }'
# When no pack buffer object is bound, the pack functions are no-ops.
if function.name in self.pack_function_names:
- print ' GLint __pack_buffer = 0;'
- print ' glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, &__pack_buffer);'
- print ' if (!__pack_buffer) {'
+ print ' GLint _pack_buffer = 0;'
+ print ' glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, &_pack_buffer);'
+ print ' if (!_pack_buffer) {'
print ' return;'
print ' }'
@@ -340,23 +340,23 @@ def invokeFunction(self, function):
print r' delete [] infoLog;'
print r' }'
if function.name in self.map_function_names:
- print r' if (!__result) {'
+ print r' if (!_result) {'
print r' retrace::warning(call) << "failed to map buffer\n";'
print r' }'
if function.name in self.unmap_function_names and function.type is not stdapi.Void:
- print r' if (!__result) {'
+ print r' if (!_result) {'
print r' retrace::warning(call) << "failed to unmap buffer\n";'
print r' }'
if function.name in ('glGetAttribLocation', 'glGetAttribLocationARB'):
- print r' GLint __orig_result = call.ret->toSInt();'
- print r' if (__result != __orig_result) {'
- print r' retrace::warning(call) << "vertex attrib location mismatch " << __orig_result << " -> " << __result << "\n";'
+ print r' GLint _origResult = call.ret->toSInt();'
+ print r' if (_result != _origResult) {'
+ print r' retrace::warning(call) << "vertex attrib location mismatch " << _origResult << " -> " << _result << "\n";'
print r' }'
if function.name in ('glCheckFramebufferStatus', 'glCheckFramebufferStatusEXT', 'glCheckNamedFramebufferStatusEXT'):
- print r' GLint __orig_result = call.ret->toSInt();'
- print r' if (__orig_result == GL_FRAMEBUFFER_COMPLETE &&'
- print r' __result != GL_FRAMEBUFFER_COMPLETE) {'
- print r' retrace::warning(call) << "incomplete framebuffer (" << glstate::enumToString(__result) << ")\n";'
+ print r' GLint _origResult = call.ret->toSInt();'
+ print r' if (_origResult == GL_FRAMEBUFFER_COMPLETE &&'
+ print r' _result != GL_FRAMEBUFFER_COMPLETE) {'
+ print r' retrace::warning(call) << "incomplete framebuffer (" << glstate::enumToString(_result) << ")\n";'
print r' }'
print ' }'
View
4 retrace/glstate_images.cpp
@@ -709,7 +709,7 @@ getFramebufferAttachmentDesc(Context &context, GLenum target, GLenum attachment,
image::Image *
getDrawBufferImage() {
GLenum format = GL_RGB;
- GLint channels = __gl_format_channels(format);
+ GLint channels = _gl_format_channels(format);
if (channels > 4) {
return NULL;
}
@@ -816,7 +816,7 @@ static inline void
dumpReadBufferImage(JSONWriter &json, GLint width, GLint height, GLenum format,
GLint internalFormat = GL_NONE)
{
- GLint channels = __gl_format_channels(format);
+ GLint channels = _gl_format_channels(format);
Context context;
View
6 retrace/glstate_params.py
@@ -233,7 +233,7 @@ def visitOpaque(self, opaque, instance):
__index = 0
def visitArray(self, array, instance):
- index = '__i%u' % JsonWriter.__index
+ index = '_i%u' % JsonWriter.__index
JsonWriter.__index += 1
print ' json.beginArray();'
print ' for (unsigned %s = 0; %s < %s; ++%s) {' % (index, index, array.length, index)
@@ -344,7 +344,7 @@ def dump_material_params(self):
def dump_light_params(self):
print ' GLint max_lights = 0;'
- print ' __glGetIntegerv(GL_MAX_LIGHTS, &max_lights);'
+ print ' _glGetIntegerv(GL_MAX_LIGHTS, &max_lights);'
print ' for (GLint index = 0; index < max_lights; ++index) {'
print ' GLenum light = GL_LIGHT0 + index;'
print ' if (glIsEnabled(light)) {'
@@ -380,7 +380,7 @@ def dump_texenv_params(self):
def dump_vertex_attribs(self):
print ' GLint max_vertex_attribs = 0;'
- print ' __glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);'
+ print ' _glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);'
print ' for (GLint index = 0; index < max_vertex_attribs; ++index) {'
print ' char name[32];'
print ' snprintf(name, sizeof name, "GL_VERTEX_ATTRIB_ARRAY%i", index);'
View
4 retrace/glstate_shaders.cpp
@@ -196,7 +196,7 @@ static void
dumpUniform(JSONWriter &json, GLint program, GLint size, GLenum type, const GLchar *name) {
GLenum elemType;
GLint numElems;
- __gl_uniform_size(type, elemType, numElems);
+ _gl_uniform_size(type, elemType, numElems);
if (elemType == GL_NONE) {
return;
}
@@ -278,7 +278,7 @@ dumpUniformARB(JSONWriter &json, GLhandleARB programObj, GLint size, GLenum type
GLenum elemType;
GLint numElems;
- __gl_uniform_size(type, elemType, numElems);
+ _gl_uniform_size(type, elemType, numElems);
if (elemType == GL_NONE) {
return;
}
View
10 retrace/glws_wgl.cpp
@@ -54,9 +54,9 @@ namespace glws {
* See also:
* - http://www.opengl.org/archives/resources/faq/technical/mswindows.htm
*/
-static __PFNWGLCHOOSEPIXELFORMAT pfnChoosePixelFormat = &ChoosePixelFormat;
-static __PFNWGLSETPIXELFORMAT pfnSetPixelFormat = &SetPixelFormat;
-static __PFNWGLSWAPBUFFERS pfnSwapBuffers = &SwapBuffers;
+static PFN_WGLCHOOSEPIXELFORMAT pfnChoosePixelFormat = &ChoosePixelFormat;
+static PFN_WGLSETPIXELFORMAT pfnSetPixelFormat = &SetPixelFormat;
+static PFN_WGLSWAPBUFFERS pfnSwapBuffers = &SwapBuffers;
static LRESULT CALLBACK
@@ -252,8 +252,8 @@ init(void) {
libgl_filename = "OPENGL32";
}
- __libGlHandle = LoadLibraryA(libgl_filename);
- if (!__libGlHandle) {
+ _libGlHandle = LoadLibraryA(libgl_filename);
+ if (!_libGlHandle) {
std::cerr << "error: unable to open " << libgl_filename << "\n";
exit(1);
}
View
58 retrace/retrace.py
@@ -43,10 +43,10 @@ class UnsupportedType(Exception):
def lookupHandle(handle, value):
if handle.key is None:
- return "__%s_map[%s]" % (handle.name, value)
+ return "_%s_map[%s]" % (handle.name, value)
else:
key_name, key_type = handle.key
- return "__%s_map[%s][%s]" % (handle.name, key_name, value)
+ return "_%s_map[%s][%s]" % (handle.name, key_name, value)
class ValueAllocator(stdapi.Visitor):
@@ -122,13 +122,13 @@ def visitBitmask(self, bitmask, lvalue, rvalue):
def visitArray(self, array, lvalue, rvalue):
- tmp = '__a_' + array.tag + '_' + str(self.seq)
+ tmp = '_a_' + array.tag + '_' + str(self.seq)
self.seq += 1
print ' if (%s) {' % (lvalue,)
print ' const trace::Array *%s = dynamic_cast<const trace::Array *>(&%s);' % (tmp, rvalue)
length = '%s->values.size()' % (tmp,)
- index = '__j' + array.tag
+ index = '_j' + array.tag
print ' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length)
try:
self.visit(array.type, '%s[%s]' % (lvalue, index), '*%s->values[%s]' % (tmp, index))
@@ -137,7 +137,7 @@ def visitArray(self, array, lvalue, rvalue):
print ' }'
def visitPointer(self, pointer, lvalue, rvalue):
- tmp = '__a_' + pointer.tag + '_' + str(self.seq)
+ tmp = '_a_' + pointer.tag + '_' + str(self.seq)
self.seq += 1
print ' if (%s) {' % (lvalue,)
@@ -182,7 +182,7 @@ def visitString(self, string, lvalue, rvalue):
seq = 0
def visitStruct(self, struct, lvalue, rvalue):
- tmp = '__s_' + struct.tag + '_' + str(self.seq)
+ tmp = '_s_' + struct.tag + '_' + str(self.seq)
self.seq += 1
print ' const trace::Struct *%s = dynamic_cast<const trace::Struct *>(&%s);' % (tmp, rvalue)
@@ -225,22 +225,22 @@ def visitBitmask(self, bitmask, lvalue, rvalue):
pass
def visitArray(self, array, lvalue, rvalue):
- print ' const trace::Array *__a%s = dynamic_cast<const trace::Array *>(&%s);' % (array.tag, rvalue)
- print ' if (__a%s) {' % (array.tag)
- length = '__a%s->values.size()' % array.tag
- index = '__j' + array.tag
+ print ' const trace::Array *_a%s = dynamic_cast<const trace::Array *>(&%s);' % (array.tag, rvalue)
+ print ' if (_a%s) {' % (array.tag)
+ length = '_a%s->values.size()' % array.tag
+ index = '_j' + array.tag
print ' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length)
try:
- self.visit(array.type, '%s[%s]' % (lvalue, index), '*__a%s->values[%s]' % (array.tag, index))
+ self.visit(array.type, '%s[%s]' % (lvalue, index), '*_a%s->values[%s]' % (array.tag, index))
finally:
print ' }'
print ' }'
def visitPointer(self, pointer, lvalue, rvalue):
- print ' const trace::Array *__a%s = dynamic_cast<const trace::Array *>(&%s);' % (pointer.tag, rvalue)
- print ' if (__a%s) {' % (pointer.tag)
+ print ' const trace::Array *_a%s = dynamic_cast<const trace::Array *>(&%s);' % (pointer.tag, rvalue)
+ print ' if (_a%s) {' % (pointer.tag)
try:
- self.visit(pointer.type, '%s[0]' % (lvalue,), '*__a%s->values[0]' % (pointer.tag,))
+ self.visit(pointer.type, '%s[0]' % (lvalue,), '*_a%s->values[0]' % (pointer.tag,))
finally:
print ' }'
@@ -259,19 +259,19 @@ def visitReference(self, reference, lvalue, rvalue):
pass
def visitHandle(self, handle, lvalue, rvalue):
- print ' %s __orig_result;' % handle.type
- OpaqueValueDeserializer().visit(handle.type, '__orig_result', rvalue);
+ print ' %s _origResult;' % handle.type
+ OpaqueValueDeserializer().visit(handle.type, '_origResult', rvalue);
if handle.range is None:
- rvalue = "__orig_result"
+ rvalue = "_origResult"
entry = lookupHandle(handle, rvalue)
print " %s = %s;" % (entry, lvalue)
print ' if (retrace::verbosity >= 2) {'
print ' std::cout << "{handle.name} " << {rvalue} << " -> " << {lvalue} << "\\n";'.format(**locals())
print ' }'
else:
- i = '__h' + handle.tag
+ i = '_h' + handle.tag
lvalue = "%s + %s" % (lvalue, i)
- rvalue = "__orig_result + %s" % (i,)
+ rvalue = "_origResult + %s" % (i,)
entry = lookupHandle(handle, rvalue)
print ' for ({handle.type} {i} = 0; {i} < {handle.range}; ++{i}) {{'.format(**locals())
print ' {entry} = {lvalue};'.format(**locals())
@@ -289,7 +289,7 @@ def visitString(self, string, lvalue, rvalue):
seq = 0
def visitStruct(self, struct, lvalue, rvalue):
- tmp = '__s_' + struct.tag + '_' + str(self.seq)
+ tmp = '_s_' + struct.tag + '_' + str(self.seq)
self.seq += 1
print ' const trace::Struct *%s = dynamic_cast<const trace::Struct *>(&%s);' % (tmp, rvalue)
@@ -383,7 +383,7 @@ def swizzleValues(self, function):
print ' // XXX: %s' % arg.name
if function.type is not stdapi.Void:
rvalue = '*call.ret'
- lvalue = '__result'
+ lvalue = '_result'
try:
self.regiterSwizzledValue(function.type, lvalue, rvalue)
except UnsupportedType:
@@ -415,9 +415,9 @@ def regiterSwizzledValue(self, type, lvalue, rvalue):
def invokeFunction(self, function):
arg_names = ", ".join(function.argNames())
if function.type is not stdapi.Void:
- print ' %s __result;' % (function.type)
- print ' __result = %s(%s);' % (function.name, arg_names)
- print ' (void)__result;'
+ print ' %s _result;' % (function.type)
+ print ' _result = %s(%s);' % (function.name, arg_names)
+ print ' (void)_result;'
else:
print ' %s(%s);' % (function.name, arg_names)
@@ -432,9 +432,9 @@ def invokeInterfaceMethod(self, interface, method):
arg_names = ", ".join(method.argNames())
if method.type is not stdapi.Void:
- print ' %s __result;' % (method.type)
- print ' __result = _this->%s(%s);' % (method.name, arg_names)
- print ' (void)__result;'
+ print ' %s _result;' % (method.type)
+ print ' _result = _this->%s(%s);' % (method.name, arg_names)
+ print ' (void)_result;'
else:
print ' _this->%s(%s);' % (method.name, arg_names)
@@ -456,10 +456,10 @@ def retraceApi(self, api):
for handle in handles:
if handle.name not in handle_names:
if handle.key is None:
- print 'static retrace::map<%s> __%s_map;' % (handle.type, handle.name)
+ print 'static retrace::map<%s> _%s_map;' % (handle.type, handle.name)
else:
key_name, key_type = handle.key
- print 'static std::map<%s, retrace::map<%s> > __%s_map;' % (key_type, handle.type, handle.name)
+ print 'static std::map<%s, retrace::map<%s> > _%s_map;' % (key_type, handle.type, handle.name)
handle_names.add(handle.name)
print
View
2 specs/cglapi.py
@@ -188,7 +188,7 @@
Function(CGLContextObj, "CGLGetCurrentContext", []),
# OpenGL.h, OpenGL framework
- Function(CGLError, "CGLChoosePixelFormat", [(Array(Const(CGLPixelFormatAttribute), "__AttribList_size(attribs)"), "attribs"), Out(Pointer(CGLPixelFormatObj), "pix"), Out(Pointer(GLint), "npix")]),
+ Function(CGLError, "CGLChoosePixelFormat", [(Array(Const(CGLPixelFormatAttribute), "_AttribList_size(attribs)"), "attribs"), Out(Pointer(CGLPixelFormatObj), "pix"), Out(Pointer(GLint), "npix")]),
Function(CGLError, "CGLDestroyPixelFormat", [(CGLPixelFormatObj, "pix")]),
Function(CGLError, "CGLDescribePixelFormat", [(CGLPixelFormatObj, "pix"), (GLint, "pix_num"), (CGLPixelFormatAttribute, "attrib"), Out(Pointer(GLint), "value")]),
Function(Void, "CGLReleasePixelFormat", [(CGLPixelFormatObj, "pix")]),
View
2 specs/eglapi.py
@@ -291,7 +291,7 @@
eglapi = API("EGL")
-EGLAttribList = Array(Const(EGLattrib), "__AttribPairList_size(attrib_list, EGL_NONE)")
+EGLAttribList = Array(Const(EGLattrib), "_AttribPairList_size(attrib_list, EGL_NONE)")
PROC = Opaque("__eglMustCastToProperFunctionPointerType")
View
692 specs/glapi.py
346 additions, 346 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
50 specs/glesapi.py
@@ -59,16 +59,16 @@ def GlFunction(*args, **kwargs):
GlFunction(Void, "glColor4x", [(GLfixed, "red"), (GLfixed, "green"), (GLfixed, "blue"), (GLfixed, "alpha")]),
GlFunction(Void, "glDepthRangex", [(GLclampx, "zNear"), (GLclampx, "zFar")]),
GlFunction(Void, "glFogx", [(GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glFogxv", [(GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glFogxv", [(GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glFrustumx", [(GLfixed, "left"), (GLfixed, "right"), (GLfixed, "bottom"), (GLfixed, "top"), (GLfixed, "zNear"), (GLfixed, "zFar")]),
GlFunction(Void, "glLightModelx", [(GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glLightModelxv", [(GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glLightModelxv", [(GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLightx", [(GLenum, "light"), (GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glLightxv", [(GLenum, "light"), (GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glLightxv", [(GLenum, "light"), (GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLineWidthx", [(GLfixed, "width")]),
GlFunction(Void, "glLoadMatrixx", [(Array(Const(GLfixed), 16), "m")]),
GlFunction(Void, "glMaterialx", [(GLenum, "face"), (GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glMaterialxv", [(GLenum, "face"), (GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glMaterialxv", [(GLenum, "face"), (GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glMultMatrixx", [(Array(Const(GLfixed), 16), "m")]),
GlFunction(Void, "glMultiTexCoord4x", [(GLenum, "target"), (GLfixed, "s"), (GLfixed, "t"), (GLfixed, "r"), (GLfixed, "q")]),
GlFunction(Void, "glNormal3x", [(GLfixed, "nx"), (GLfixed, "ny"), (GLfixed, "nz")]),
@@ -79,20 +79,20 @@ def GlFunction(*args, **kwargs):
GlFunction(Void, "glSampleCoveragex", [(GLclampx, "value"), (GLboolean, "invert")]),
GlFunction(Void, "glScalex", [(GLfixed, "x"), (GLfixed, "y"), (GLfixed, "z")]),
GlFunction(Void, "glTexEnvx", [(GLenum, "target"), (GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glTexEnvxv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glTexEnvxv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexParameterx", [(GLenum, "target"), (GLenum, "pname"), (GLfixed, "param")]),
GlFunction(Void, "glTranslatex", [(GLfixed, "x"), (GLfixed, "y"), (GLfixed, "z")]),
GlFunction(Void, "glClipPlanex", [(GLenum, "plane"), (Array(Const(GLfixed), 4), "equation")]),
GlFunction(Void, "glGetClipPlanex", [(GLenum, "plane"), Out(Array(GLfixed, 4), "equation")], sideeffects=False),
- GlFunction(Void, "glGetFixedv", [(GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetLightxv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetMaterialxv", [(GLenum, "face"), (GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetTexEnvxv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetTexParameterxv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetFixedv", [(GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetLightxv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetMaterialxv", [(GLenum, "face"), (GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetTexEnvxv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetTexParameterxv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glPointParameterx", [(GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glPointParameterxv", [(GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
- GlFunction(Void, "glTexParameterxv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glPointParameterxv", [(GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glTexParameterxv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
# GL_ES_VERSION_2_0
@@ -114,15 +114,15 @@ def GlFunction(*args, **kwargs):
GlFunction(Void, "glDeleteRenderbuffersOES", [(GLsizei, "n"), (Array(Const(GLrenderbuffer), "n"), "renderbuffers")]),
GlFunction(Void, "glGenRenderbuffersOES", [(GLsizei, "n"), Out(Array(GLrenderbuffer, "n"), "renderbuffers")]),
GlFunction(Void, "glRenderbufferStorageOES", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
- GlFunction(Void, "glGetRenderbufferParameterivOES", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetRenderbufferParameterivOES", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(GLboolean, "glIsFramebufferOES", [(GLframebuffer, "framebuffer")], sideeffects=False),
GlFunction(Void, "glBindFramebufferOES", [(GLenum, "target"), (GLframebuffer, "framebuffer")]),
GlFunction(Void, "glDeleteFramebuffersOES", [(GLsizei, "n"), (Array(Const(GLframebuffer), "n"), "framebuffers")]),
GlFunction(Void, "glGenFramebuffersOES", [(GLsizei, "n"), Out(Array(GLframebuffer, "n"), "framebuffers")]),
GlFunction(GLenum, "glCheckFramebufferStatusOES", [(GLenum, "target")]),
GlFunction(Void, "glFramebufferTexture2DOES", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
GlFunction(Void, "glFramebufferRenderbufferOES", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
- GlFunction(Void, "glGetFramebufferAttachmentParameterivOES", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetFramebufferAttachmentParameterivOES", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGenerateMipmapOES", [(GLenum, "target")]),
# GL_OES_matrix_palette
@@ -139,23 +139,23 @@ def GlFunction(*args, **kwargs):
# GL_OES_texture_cube_map
GlFunction(Void, "glTexGenfOES", [(GLenum, "coord"), (GLenum, "pname"), (GLfloat, "param")]),
- GlFunction(Void, "glTexGenfvOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glTexGenfvOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexGeniOES", [(GLenum, "coord"), (GLenum, "pname"), (GLint, "param")]),
- GlFunction(Void, "glTexGenivOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLint), "__gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glTexGenivOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexGenxOES", [(GLenum, "coord"), (GLenum, "pname"), (GLfixed, "param")]),
- GlFunction(Void, "glTexGenxvOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLfixed), "__gl_param_size(pname)"), "params")]),
- GlFunction(Void, "glGetTexGenfvOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetTexGenivOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetTexGenxvOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLfixed, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glTexGenxvOES", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLfixed), "_gl_param_size(pname)"), "params")]),
+ GlFunction(Void, "glGetTexGenfvOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetTexGenivOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetTexGenxvOES", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLfixed, "_gl_param_size(pname)"), "params")], sideeffects=False),
# GL_OES_mapbuffer
GlFunction(Void, "glGetBufferPointervOES", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
GlFunction(GLmap, "glMapBufferOES", [(GLenum, "target"), (GLenum, "access")]),
GlFunction(GLboolean, "glUnmapBufferOES", [(GLenum, "target")]),
# GL_OES_texture_3D
- GlFunction(Void, "glTexImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage3D_size(format, type, width, height, depth)"), "pixels")]),
- GlFunction(Void, "glTexSubImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexSubImage3D_size(format, type, width, height, depth)"), "pixels")]),
+ GlFunction(Void, "glTexImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexImage3D_size(format, type, width, height, depth)"), "pixels")]),
+ GlFunction(Void, "glTexSubImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexSubImage3D_size(format, type, width, height, depth)"), "pixels")]),
GlFunction(Void, "glCopyTexSubImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glCompressedTexImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexSubImage3DOES", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
@@ -213,8 +213,8 @@ def GlFunction(*args, **kwargs):
GlFunction(GLboolean, "glIsQueryEXT", [(GLquery, "id")], sideeffects=False),
GlFunction(Void, "glBeginQueryEXT", [(GLenum, "target"), (GLquery, "id")]),
GlFunction(Void, "glEndQueryEXT", [(GLenum, "target")]),
- GlFunction(Void, "glGetQueryivEXT", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
- GlFunction(Void, "glGetQueryObjectuivEXT", [(GLquery, "id"), (GLenum, "pname"), Out(Array(GLuint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetQueryivEXT", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetQueryObjectuivEXT", [(GLquery, "id"), (GLenum, "pname"), Out(Array(GLuint, "_gl_param_size(pname)"), "params")], sideeffects=False),
# GL_EXT_separate_shader_objects
GlFunction(Void, "glUseProgramStagesEXT", [(GLpipeline, "pipeline"), (GLbitfield_shader, "stages"), (GLprogram, "program")]),
@@ -225,7 +225,7 @@ def GlFunction(*args, **kwargs):
GlFunction(Void, "glGenProgramPipelinesEXT", [(GLsizei, "n"), Out(Array(GLpipeline, "n"), "pipelines")]),
GlFunction(GLboolean, "glIsProgramPipelineEXT", [(GLpipeline, "pipeline")], sideeffects=False),
#GlFunction(Void, "glProgramParameteriEXT", [(GLprogram, "program"), (GLenum, "pname"), (GLint, "value")]),
- GlFunction(Void, "glGetProgramPipelineivEXT", [(GLpipeline, "pipeline"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+ GlFunction(Void, "glGetProgramPipelineivEXT", [(GLpipeline, "pipeline"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
#GlFunction(Void, "glProgramUniform1iEXT", [(GLprogram, "program"), (GLlocation, "location"), (GLint, "x")]),
#GlFunction(Void, "glProgramUniform2iEXT", [(GLprogram, "program"), (GLlocation, "location"), (GLint, "x"), (GLint, "y")]),
#GlFunction(Void, "glProgramUniform3iEXT", [(GLprogram, "program"), (GLlocation, "location"), (GLint, "x"), (GLint, "y"), (GLint, "z")]),
View
20 specs/glxapi.py
@@ -248,7 +248,7 @@
glxapi.addFunctions([
# GLX
- Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (Array(GLXAttrib, "__AttribList_size(attribList)"), "attribList")]),
+ Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (Array(GLXAttrib, "_AttribList_size(attribList)"), "attribList")]),
Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool, "direct")]),
Function(Void, "glXDestroyContext", [(Display, "dpy"), (GLXContext, "ctx")]),
Function(Bool, "glXMakeCurrent", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXContext, "ctx")]),
@@ -278,20 +278,20 @@
Function(Display, "glXGetCurrentDisplay", [], sideeffects=False),
# GLX 1.3 and later
- Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (Array(Const(GLXAttrib), "__AttribPairList_size(attribList)"), "attribList"), Out(Pointer(Int), "nitems")]),
+ Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (Array(Const(GLXAttrib), "_AttribPairList_size(attribList)"), "attribList"), Out(Pointer(Int), "nitems")]),
Function(Int, "glXGetFBConfigAttrib", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXAttrib, "attribute"), Out(Pointer(Int), "value")]),
Function(Array(GLXFBConfig, "*nelements"), "glXGetFBConfigs", [(Display, "dpy"), (Int, "screen"),
Out(Pointer(Int), "nelements")]),
Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfig", [(Display, "dpy"),
(GLXFBConfig, "config")]),
Function(GLXWindow, "glXCreateWindow", [(Display, "dpy"), (GLXFBConfig, "config"),
- (Window, "win"), (Array(Const(Int), "__AttribPairList_size(attribList)"), "attribList")]),
+ (Window, "win"), (Array(Const(Int), "_AttribPairList_size(attribList)"), "attribList")]),
Function(Void, "glXDestroyWindow", [(Display, "dpy"), (GLXWindow, "window")]),
Function(GLXPixmap, "glXCreatePixmap", [(Display, "dpy"), (GLXFBConfig, "config"),
- (Pixmap, "pixmap"), (Array(Const(Int), "__AttribPairList_size(attribList)"), "attribList")]),
+ (Pixmap, "pixmap"), (Array(Const(Int), "_AttribPairList_size(attribList)"), "attribList")]),
Function(Void, "glXDestroyPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
Function(GLXPbuffer, "glXCreatePbuffer", [(Display, "dpy"), (GLXFBConfig, "config"),
- (Array(Const(GLXEnum), "__AttribPairList_size(attribList)"), "attribList")]),
+ (Array(Const(GLXEnum), "_AttribPairList_size(attribList)"), "attribList")]),
Function(Void, "glXDestroyPbuffer", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
Function(Void, "glXQueryDrawable", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXEnum, "attribute"),
Out(Pointer(UInt), "value")]),
@@ -309,7 +309,7 @@
Out(Pointer(ULong), "mask")]),
# GLX_ARB_create_context
- Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (Array(Const(GLXAttrib), "__AttribPairList_size(attrib_list)"), "attrib_list")]),
+ Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (Array(Const(GLXAttrib), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
# GLX_SGI_swap_control
Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]),
@@ -335,14 +335,14 @@
# GLX_SGIX_fbconfig
Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), Out(Pointer(Int), "value")]),
- Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (Array(Int, "__AttribPairList_size(attrib_list)"), "attrib_list"), Out(Pointer(Int), "nelements")]),
+ Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (Array(Int, "_AttribPairList_size(attrib_list)"), "attrib_list"), Out(Pointer(Int), "nelements")]),
Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]),
Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]),
Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]),
Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), Out(Pointer(XVisualInfo), "vis")]),
# GLX_SGIX_pbuffer
- Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (Array(Int, "__AttribPairList_size(attrib_list)"), "attrib_list")]),
+ Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (Array(Int, "_AttribPairList_size(attrib_list)"), "attrib_list")]),
Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]),
Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), Out(Pointer(UInt), "value")]),
Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]),
@@ -408,12 +408,12 @@
Function(UInt, "glXGetAGPOffsetMESA", [(OpaquePointer(Const(Void)), "pointer")]),
# EXT_texture_from_pixmap
- Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer"), (Array(Const(Int), "__AttribPairList_size(attrib_list)"), "attrib_list")]),
+ Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer"), (Array(Const(Int), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer")]),
# GLX_NV_present_video
#Function(OpaquePointer(UInt), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]),
- #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (Array(Const(Int), "__AttribPairList_size(attrib_list)"), "attrib_list")]),
+ #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (Array(Const(Int), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
# GLX_NV_video_output
#Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), (OpaquePointer(GLXVideoDeviceNV), "pVideoDevice")]),
View
2 specs/scripts/glspec.py
@@ -238,7 +238,7 @@ def parse_arg(self, function_name, arg_name, arg_type):
length = "%s" % length
arg_type = '%s(%s, %s)' % (constructor, base_type, length)
else:
- length = length.replace("COMPSIZE", "__%s_size" % function_name)
+ length = length.replace("COMPSIZE", "_%s_size" % function_name)
length = length.replace("/", ", ")
arg_type = 'Opaque%s(%s, %s)' % (constructor, base_type, length)
else:
View
10 specs/wglapi.py
@@ -180,14 +180,14 @@
# WGL_ARB_pixel_format
StdFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
StdFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
- StdFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Array(Const(WGLenum), "__AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "__AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "(*nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
+ StdFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "_AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "(*nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
# WGL_ARB_make_current_read
StdFunction(BOOL, "wglMakeContextCurrentARB", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]),
StdFunction(HDC, "wglGetCurrentReadDCARB", [], sideeffects=False),
# WGL_ARB_pbuffer
- StdFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Array(Const(WGLenum), "__AttribPairList_size(piAttribList)"), "piAttribList")]),
+ StdFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
StdFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")]),
StdFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]),
StdFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]),
@@ -196,10 +196,10 @@
# WGL_ARB_render_texture
StdFunction(BOOL, "wglBindTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]),
StdFunction(BOOL, "wglReleaseTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]),
- StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (Array(Const(WGLenum), "__AttribPairList_size(piAttribList)"), "piAttribList")]),
+ StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
# WGL_ARB_create_context
- StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (Array(Const(WGLenum), "__AttribPairList_size(attribList)"), "attribList")]),
+ StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (Array(Const(WGLenum), "_AttribPairList_size(attribList)"), "attribList")]),
# WGL_EXT_extensions_string
StdFunction(Const(CString), "wglGetExtensionsStringEXT", [], sideeffects=False),
@@ -211,7 +211,7 @@
# WGL_EXT_pixel_format
StdFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
StdFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
- StdFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Array(Const(WGLenum), "__AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "__AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "*nNumFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
+ StdFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "_AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "*nNumFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
# WGL_EXT_swap_control
StdFunction(BOOL, "wglSwapIntervalEXT", [(Int, "interval")]),
View
2 wrappers/d3d9trace.py
@@ -66,7 +66,7 @@ def implementWrapperInterfaceMethodBody(self, interface, base, method):
assert descArg.output
descType = getDescMethod.args[0].type.type
- print ' if (__result == D3D_OK && !(Flags & D3DLOCK_READONLY)) {'
+ print ' if (_result == D3D_OK && !(Flags & D3DLOCK_READONLY)) {'
print ' if (SizeToLock) {'
print ' m_SizeToLock = SizeToLock;'
print ' } else {'
View
2 wrappers/dlltrace.py
@@ -40,7 +40,7 @@ def header(self, api):
static HINSTANCE g_hDll = NULL;
static PROC
-__getPublicProcAddress(LPCSTR lpProcName)
+_getPublicProcAddress(LPCSTR lpProcName)
{
if (!g_hDll) {
char szDll[MAX_PATH] = {0};
View
16 wrappers/egltrace.py
@@ -57,8 +57,8 @@ def traceFunctionImplBody(self, function):
print ' if (ctx != EGL_NO_CONTEXT) {'
print ' EGLint api = EGL_OPENGL_ES_API, version = 1;'
print ' gltrace::Context *tr = gltrace::getContext();'
- print ' __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);'
- print ' __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &version);'
+ print ' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);'
+ print ' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &version);'
print ' if (api == EGL_OPENGL_API)'
print ' tr->profile = gltrace::PROFILE_COMPAT;'
print ' else if (version == 1)'
@@ -102,13 +102,13 @@ def traceFunctionImplBody(self, function):
/*
* Invoke the true dlopen() function.
*/
-static void *__dlopen(const char *filename, int flag)
+static void *_dlopen(const char *filename, int flag)
{
- typedef void * (*PFNDLOPEN)(const char *, int);
- static PFNDLOPEN dlopen_ptr = NULL;
+ typedef void * (*PFN_DLOPEN)(const char *, int);
+ static PFN_DLOPEN dlopen_ptr = NULL;
if (!dlopen_ptr) {
- dlopen_ptr = (PFNDLOPEN)dlsym(RTLD_NEXT, "dlopen");
+ dlopen_ptr = (PFN_DLOPEN)dlsym(RTLD_NEXT, "dlopen");
if (!dlopen_ptr) {
os::log("apitrace: error: dlsym(RTLD_NEXT, \"dlopen\") failed\n");
return NULL;
@@ -155,14 +155,14 @@ def traceFunctionImplBody(self, function):
}
}
- void *handle = __dlopen(filename, flag);
+ void *handle = _dlopen(filename, flag);
if (intercept) {
// Get the file path for our shared object, and use it instead
static int dummy = 0xdeedbeef;
Dl_info info;
if (dladdr(&dummy, &info)) {
- handle = __dlopen(info.dli_fname, flag);
+ handle = _dlopen(info.dli_fname, flag);
} else {
os::log("apitrace: warning: dladdr() failed\n");
}
View
14 wrappers/glcaps.cpp
@@ -162,9 +162,9 @@ overrideExtensionsString(const char *extensions)
const GLubyte *
-__glGetString_override(GLenum name)
+_glGetString_override(GLenum name)
{
- const GLubyte *result = __glGetString(name);
+ const GLubyte *result = _glGetString(name);
if (result) {
switch (name) {
@@ -181,9 +181,9 @@ __glGetString_override(GLenum name)
void
-__glGetIntegerv_override(GLenum pname, GLint *params)
+_glGetIntegerv_override(GLenum pname, GLint *params)
{
- __glGetIntegerv(pname, params);
+ _glGetIntegerv(pname, params);
if (params) {
switch (pname) {
@@ -201,14 +201,14 @@ __glGetIntegerv_override(GLenum pname, GLint *params)
const GLubyte *
-__glGetStringi_override(GLenum name, GLuint index)
+_glGetStringi_override(GLenum name, GLuint index)
{
switch (name) {
case GL_EXTENSIONS:
{
const ExtensionsDesc *desc = getExtraExtensions();
GLint numExtensions = 0;
- __glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
+ _glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
if ((GLuint)numExtensions <= index && index < (GLuint)numExtensions + desc->numStrings) {
return (const GLubyte *)desc->strings[index - (GLuint)numExtensions];
}
@@ -218,7 +218,7 @@ __glGetStringi_override(GLenum name, GLuint index)
break;
}
- return __glGetStringi(name, index);
+ return _glGetStringi(name, index);
}
View
6 wrappers/gltrace.hpp
@@ -50,13 +50,13 @@ Context *
getContext(void);
const GLubyte *
-__glGetString_override(GLenum name);
+_glGetString_override(GLenum name);
void
-__glGetIntegerv_override(GLenum pname, GLint *params);
+_glGetIntegerv_override(GLenum pname, GLint *params);
const GLubyte *
-__glGetStringi_override(GLenum name, GLuint index);
+_glGetStringi_override(GLenum name, GLuint index);
} /* namespace gltrace */
View
258 wrappers/gltrace.py
@@ -125,20 +125,20 @@ def header(self, api):
print 'gltrace::getContext(void)'
print '{'
print ' // TODO return the context set by other APIs (GLX, EGL, and etc.)'
- print ' static gltrace::Context __ctx = { gltrace::PROFILE_COMPAT, false, false, false };'
- print ' return &__ctx;'
+ print ' static gltrace::Context _ctx = { gltrace::PROFILE_COMPAT, false, false, false };'
+ print ' return &_ctx;'
print '}'
print
- print 'static vertex_attrib __get_vertex_attrib(void) {'
+ print 'static vertex_attrib _get_vertex_attrib(void) {'
print ' gltrace::Context *ctx = gltrace::getContext();'
print ' if (ctx->user_arrays_arb || ctx->user_arrays_nv) {'
- print ' GLboolean __vertex_program = GL_FALSE;'
- print ' __glGetBooleanv(GL_VERTEX_PROGRAM_ARB, &__vertex_program);'
- print ' if (__vertex_program) {'
+ print ' GLboolean _vertex_program = GL_FALSE;'
+ print ' _glGetBooleanv(GL_VERTEX_PROGRAM_ARB, &_vertex_program);'
+ print ' if (_vertex_program) {'
print ' if (ctx->user_arrays_nv) {'
- print ' GLint __vertex_program_binding_nv = 0;'
- print ' __glGetIntegerv(GL_VERTEX_PROGRAM_BINDING_NV, &__vertex_program_binding_nv);'
- print ' if (__vertex_program_binding_nv) {'
+ print ' GLint _vertex_program_binding_nv = 0;'
+ print ' _glGetIntegerv(GL_VERTEX_PROGRAM_BINDING_NV, &_vertex_program_binding_nv);'
+ print ' if (_vertex_program_binding_nv) {'
print ' return VERTEX_ATTRIB_NV;'
print ' }'
print ' }'
@@ -150,7 +150,7 @@ def header(self, api):
print
# Whether we need user arrays
- print 'static inline bool __need_user_arrays(void)'
+ print 'static inline bool _need_user_arrays(void)'
print '{'
print ' gltrace::Context *ctx = gltrace::getContext();'
print ' if (!ctx->user_arrays) {'
@@ -170,10 +170,10 @@ def header(self, api):
print ' // %s' % function_name
print ' if (%s) {' % profile_check
self.array_prolog(api, uppercase_name)
- print ' if (__glIsEnabled(%s)) {' % enable_name
- print ' GLint __binding = 0;'
- print ' __glGetIntegerv(%s, &__binding);' % binding_name
- print ' if (!__binding) {'
+ print ' if (_glIsEnabled(%s)) {' % enable_name
+ print ' GLint _binding = 0;'
+ print ' _glGetIntegerv(%s, &_binding);' % binding_name
+ print ' if (!_binding) {'
self.array_cleanup(api, uppercase_name)
print ' return true;'
print ' }'
@@ -186,48 +186,48 @@ def header(self, api):
print ' if (ctx->profile == gltrace::PROFILE_ES1)'
print ' return false;'
print
- print ' vertex_attrib __vertex_attrib = __get_vertex_attrib();'
+ print ' vertex_attrib _vertex_attrib = _get_vertex_attrib();'
print
print ' // glVertexAttribPointer'
- print ' if (__vertex_attrib == VERTEX_ATTRIB) {'
- print ' GLint __max_vertex_attribs = 0;'
- print ' __glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &__max_vertex_attribs);'
- print ' for (GLint index = 0; index < __max_vertex_attribs; ++index) {'
- print ' GLint __enabled = 0;'
- print ' __glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &__enabled);'
- print ' if (__enabled) {'
- print ' GLint __binding = 0;'
- print ' __glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &__binding);'
- print ' if (!__binding) {'
+ print ' if (_vertex_attrib == VERTEX_ATTRIB) {'
+ print ' GLint _max_vertex_attribs = 0;'
+ print ' _glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &_max_vertex_attribs);'
+ print ' for (GLint index = 0; index < _max_vertex_attribs; ++index) {'
+ print ' GLint _enabled = 0;'
+ print ' _glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &_enabled);'
+ print ' if (_enabled) {'
+ print ' GLint _binding = 0;'
+ print ' _glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &_binding);'
+ print ' if (!_binding) {'
print ' return true;'
print ' }'
print ' }'
print ' }'
print ' }'
print
print ' // glVertexAttribPointerARB'
- print ' if (__vertex_attrib == VERTEX_ATTRIB_ARB) {'
- print ' GLint __max_vertex_attribs = 0;'
- print ' __glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &__max_vertex_attribs);'
- print ' for (GLint index = 0; index < __max_vertex_attribs; ++index) {'
- print ' GLint __enabled = 0;'
- print ' __glGetVertexAttribivARB(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB, &__enabled);'
- print ' if (__enabled) {'
- print ' GLint __binding = 0;'
- print ' __glGetVertexAttribivARB(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB, &__binding);'
- print ' if (!__binding) {'
+ print ' if (_vertex_attrib == VERTEX_ATTRIB_ARB) {'
+ print ' GLint _max_vertex_attribs = 0;'
+ print ' _glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &_max_vertex_attribs);'
+ print ' for (GLint index = 0; index < _max_vertex_attribs; ++index) {'
+ print ' GLint _enabled = 0;'
+ print ' _glGetVertexAttribivARB(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB, &_enabled);'
+ print ' if (_enabled) {'
+ print ' GLint _binding = 0;'
+ print ' _glGetVertexAttribivARB(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB, &_binding);'
+ print ' if (!_binding) {'
print ' return true;'
print ' }'
print ' }'
print ' }'
print ' }'
print
print ' // glVertexAttribPointerNV'
- print ' if (__vertex_attrib == VERTEX_ATTRIB_NV) {'
+ print ' if (_vertex_attrib == VERTEX_ATTRIB_NV) {'
print ' for (GLint index = 0; index < 16; ++index) {'
- print ' GLint __enabled = 0;'
- print ' __glGetIntegerv(GL_VERTEX_ATTRIB_ARRAY0_NV + index, &__enabled);'
- print ' if (__enabled) {'
+ print ' GLint _enabled = 0;'
+ print ' _glGetIntegerv(GL_VERTEX_ATTRIB_ARRAY0_NV + index, &_enabled);'
+ print ' if (_enabled) {'
print ' return true;'
print ' }'
print