当前位置: 首页>>代码示例>>Python>>正文


Python API.addApi方法代码示例

本文整理汇总了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)


/*
开发者ID:ds-hwang,项目名称:apitrace,代码行数:33,代码来源:egltrace.py

示例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;

'''
开发者ID:netconstructor,项目名称:apitrace,代码行数:32,代码来源:cgltrace.py

示例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 '    }'
开发者ID:berkus,项目名称:apitrace,代码行数:33,代码来源:glxtrace.py

示例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)
开发者ID:RAOF,项目名称:apitrace,代码行数:32,代码来源:wgltrace.py


注:本文中的specs.stdapi.API.addApi方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。