本文整理汇总了Python中specs.stdapi.API.addApi方法的典型用法代码示例。如果您正苦于以下问题:Python API.addApi方法的具体用法?Python API.addApi怎么用?Python API.addApi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类specs.stdapi.API
的用法示例。
在下文中一共展示了API.addApi方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: API
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addApi [as 别名]
print '#include <stdlib.h>'
print '#include <string.h>'
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define EGL_EGLEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.addApi(eglapi)
api.addApi(glapi)
api.addApi(glesapi)
tracer = EglTracer()
tracer.traceApi(api)
print r'''
/*
* Android does not support LD_PRELOAD.
*/
#if !defined(ANDROID)
/*
示例2: API
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addApi [as 别名]
# all OpenGL symbols are visible on MacOSX
return True
if __name__ == '__main__':
print
print '#include <stdlib.h>'
print '#include <string.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.addApi(cglapi)
api.addApi(glapi)
tracer = CglTracer()
tracer.traceApi(api)
print r'''
PUBLIC
void * gll_noop = 0;
'''
示例3: __unwrap_proc_addr
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addApi [as 别名]
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define GLX_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr);'
print
api = API()
api.addApi(glxapi)
api.addApi(glapi)
tracer = GlxTracer()
tracer.trace_api(api)
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr) {'
print ' if (!procPtr) {'
print ' return procPtr;'
print ' }'
for f in api.functions:
ptype = function_pointer_type(f)
pvalue = function_pointer_value(f)
print ' if (strcmp("%s", (const char *)procName) == 0) {' % f.name
print ' %s = (%s)procPtr;' % (pvalue, ptype)
print ' return (__GLXextFuncPtr)&%s;' % (f.name,)
print ' }'
示例4: if
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addApi [as 别名]
print ' if (_result) {'
print ' if (hglrc != NULL)'
print ' gltrace::setContext((uintptr_t)hglrc);'
print ' else'
print ' gltrace::clearContext();'
print ' }'
if __name__ == '__main__':
print
print '#define _GDI32_'
print
print '#include <string.h>'
print '#include <windows.h>'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define WGL_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.addApi(glapi)
api.addApi(wglapi)
tracer = WglTracer()
tracer.traceApi(api)