本文整理汇总了Python中specs.stdapi.API.addModule方法的典型用法代码示例。如果您正苦于以下问题:Python API.addModule方法的具体用法?Python API.addModule怎么用?Python API.addModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类specs.stdapi.API
的用法示例。
在下文中一共展示了API.addModule方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r"#define INITGUID"
print
print r"#include <string.h>"
print
print r"#include <iostream>"
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print """static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;"""
print """static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;"""
print """static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;"""
print
api = API()
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
示例2: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "dcompimports.hpp"'
print r'#include "d3dstate.hpp"'
print r'#include "d3d9imports.hpp" // D3DERR_WASSTILLDRAWING'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
api = API()
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
api.addModule(dcomp)
retracer = D3DRetracer()
retracer.retraceApi(api)
示例3: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
api = API()
print r'#include "d3dimports.hpp"'
api.addModule(ddraw)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice7> d3d7Dumper;'''
print
retracer = D3DRetracer()
retracer.table_name = 'd3dretrace::ddraw_callbacks'
retracer.retraceApi(api)
示例4: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
print r'''
static void
createWindow(DXGI_SWAP_CHAIN_DESC *pSwapChainDesc) {
UINT Width = pSwapChainDesc->BufferDesc.Width;
UINT Height = pSwapChainDesc->BufferDesc.Height;
if (!Width) Width = 1024;
if (!Height) Height = 768;
if (retrace::forceWindowed) {
pSwapChainDesc->Windowed = TRUE;
}
pSwapChainDesc->OutputWindow = d3dretrace::createWindow(Width, Height);
}
'''
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
示例5: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
moduleName = sys.argv[1]
support = int(sys.argv[2])
api = API()
if support:
if moduleName == 'd3d9':
from specs.d3d9 import d3d9, d3dperf
print r'#include "d3d9imports.hpp"'
print r'#include "d3d9size.hpp"'
d3d9.mergeModule(d3dperf)
api.addModule(d3d9)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;'''
print
elif moduleName == 'd3d8':
from specs.d3d8 import d3d8
print r'#include "d3d8imports.hpp"'
print r'#include "d3d8size.hpp"'
api.addModule(d3d8)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;'''
print
else:
assert False
retracer = D3DRetracer()
retracer.table_name = 'd3dretrace::%s_callbacks' % moduleName
retracer.retraceApi(api)
示例6: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
api.addModule(dxgi)
if 'd3d10' in moduleNames:
if 'd3d10_1' in moduleNames:
print r'#include "d3d10_1imports.hpp"'
api.addModule(d3d10_1)
else:
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
api.addModule(d3d10)
print
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print
if 'd3d11' in moduleNames:
print r'#include "d3d11imports.hpp"'
if 'd3d11_1' in moduleNames:
print '#include <d3d11_1.h>'
import specs.d3d11_1
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
api.addModule(d3d11)
print
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
retracer = D3DRetracer()
retracer.retraceApi(api)
示例7: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
示例8: main
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
def main():
print r"#include <string.h>"
print
print r"#include <iostream>"
print
print r'#include "d3dretrace.hpp"'
print
moduleName = sys.argv[1]
support = int(sys.argv[2])
api = API()
if support:
if moduleName == "d3d9":
from specs.d3d9 import d3d9, d3dperf
from specs.dxva2 import dxva2
print r'#include "d3d9imports.hpp"'
print r'#include "d3d9size.hpp"'
print r'#include "dxva2imports.hpp"'
d3d9.mergeModule(d3dperf)
api.addModule(d3d9)
api.addModule(dxva2)
print
print """static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;"""
print """static d3dretrace::D3DDumper<IDirect3DSwapChain9> d3d9scDumper;"""
print
elif moduleName == "d3d8":
from specs.d3d8 import d3d8
print r'#include "d3d8imports.hpp"'
print r'#include "d3d8size.hpp"'
api.addModule(d3d8)
print
print """static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;"""
print
else:
assert False
retracer = D3DRetracer()
retracer.table_name = "d3dretrace::%s_callbacks" % moduleName
retracer.retraceApi(api)
示例9: if
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
print ' _MappedData[Level] = std::make_pair(mappedSize, pbData);'
print ' } else {'
print ' _MappedData.erase(Level);'
print ' }'
else:
# FIXME: handle recursive locks
print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
print ' } else {'
print ' m_pbData = NULL;'
print ' _MappedSize = 0;'
print ' }'
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#include "d3d9imports.hpp"'
print '#include "d3d9size.hpp"'
print '#include "d3d9shader.hpp"'
print '#include "dxvaint.h"'
print
api = API()
api.addModule(d3d9)
tracer = D3D9Tracer()
tracer.traceApi(api)
示例10: Module
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
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
module = Module()
module.mergeModule(glxapi)
module.mergeModule(glapi)
api = API()
api.addModule(module)
tracer = GlxTracer()
tracer.traceApi(api)
print r'''
/*
* Invoke the true dlopen() function.
*/
static void *_dlopen(const char *filename, int flag)
{
typedef void * (*PFN_DLOPEN)(const char *, int);
static PFN_DLOPEN dlopen_ptr = NULL;
if (!dlopen_ptr) {
示例11: in
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
self.emit_memcpy('(LPBYTE)m_pbData', '_MappedSize')
print ' }'
DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
if method.name in ('Lock', 'LockRect', 'LockBox'):
# FIXME: handle recursive locks
print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
print ' } else {'
print ' m_pbData = NULL;'
print ' _MappedSize = 0;'
print ' }'
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#include "d3d8imports.hpp"'
print '#include "d3d8size.hpp"'
print '#include "d3d9shader.hpp"'
print
api = API()
api.addModule(d3d8)
tracer = D3D8Tracer()
tracer.traceApi(api)
示例12: if
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
print ' _MappedSize = 0;'
print ' }'
if interface.name == 'IDirectXVideoDecoder' and method.name == 'GetBuffer':
print ' if (SUCCEEDED(_result)) {'
print ' _MappedData[BufferType] = std::make_pair(*ppBuffer, *pBufferSize);'
print ' } else {'
print ' _MappedData[BufferType] = std::make_pair(nullptr, 0);'
print ' }'
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#include "d3d9imports.hpp"'
print '#include "d3d9size.hpp"'
print '#include "d3d9shader.hpp"'
print '#include "dxva2imports.hpp"'
print
d3d9.mergeModule(d3dperf)
api = API()
api.addModule(d3d9)
api.addModule(dxva2)
tracer = D3D9Tracer()
tracer.traceApi(api)
示例13: API
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
print ' } else {'
print ' _MapDesc.pData = NULL;'
print ' _MapDesc.Size = 0;'
print ' }'
#print r' os::log("%%p <- %%p+%%lu\n", %s,_MapDesc.pData, (unsigned long)_MapDesc.Size);' % pResource
print ' %s->_MapDesc = _MapDesc;' % pResource
if __name__ == '__main__':
print r'#define INITGUID'
print
print r'#include "trace_writer_local.hpp"'
print r'#include "os.hpp"'
print
print r'#include "d3dcommonshader.hpp"'
print
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print
api = API()
api.addModule(dxgi.dxgi)
api.addModule(d3d10.d3d10)
api.addModule(d3d10_1.d3d10_1)
api.addModule(d3d11.d3d11)
tracer = D3DCommonTracer()
tracer.traceApi(api)
示例14: Module
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
# if REGAL_SYS_GLX
# undef REGAL_SYS_GLX
# define REGAL_SYS_GLX 0
# endif
#endif
'''
cglmodule = Module('cgl')
cglmodule.mergeModule(cglapi)
eglmodule = Module('egl')
eglmodule.mergeModule(eglapi)
glxmodule = Module('glx')
glxmodule.mergeModule(glxapi)
wglmodule = Module('wgl')
wglmodule.mergeModule(wglapi)
gfxmodule = Module('gfx')
gfxmodule.mergeModule(glapi)
gfxmodule.mergeModule(glesapi)
api = API()
api.addModule(gfxmodule)
api.addModule(cglmodule)
api.addModule(eglmodule)
api.addModule(glxmodule)
api.addModule(wglmodule)
tracer = RegalTracer()
tracer.traceApi(api)
示例15: API
# 需要导入模块: from specs.stdapi import API [as 别名]
# 或者: from specs.stdapi.API import addModule [as 别名]
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
##########################################################################/
from dlltrace import DllTracer
from specs.stdapi import API
from specs.dwrite import dwrite
from specs.d2d1 import d2d1
if __name__ == '__main__':
print '#include "guids_defs.hpp"'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#define DWRITE_EXPORT WINAPI'
print
print '#include "d2dimports.hpp"'
print
api = API()
api.addModule(d2d1)
api.addModule(dwrite)
tracer = DllTracer()
tracer.traceApi(api)