예제 #1
0
    print('#include <string.h>')
    print('#include <windows.h>')
    print()
    print('#include <sstream>')
    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()
    print('static OS_THREAD_LOCAL uintptr_t _reentrant;')
    print()
    print('// Helper class to track reentries in function scope.')
    print('struct ReentryScope {')
    print('inline ReentryScope() { _reentrant = 1; }')
    print('inline ~ReentryScope() { _reentrant = 0; }')
    print('};')
    print()
    module = Module()
    module.mergeModule(glapi)
    module.mergeModule(wglapi)
    api = API()
    api.addModule(module)
    tracer = WglTracer()
    tracer.traceApi(api)
예제 #2
0
    print '#include <string.h>'
    print
    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

    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);
예제 #3
0
파일: glxtrace.py 프로젝트: werman/apitrace
            self.emitFakeTexture2D()
            print(r'''
                }
            ''')


if __name__ == '__main__':
    print()
    print('#include <stdlib.h>')
    print('#include <string.h>')
    print()
    print('#include <memory>')
    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)
예제 #4
0
    print '#include <string.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 "dlopen.hpp"'
    print '#include "glproc.hpp"'
    print '#include "glsize.hpp"'
    print '#include "eglsize.hpp"'
    print
    
    module = Module()
    module.mergeModule(eglapi)
    module.mergeModule(glapi)
    api = API()
    api.addModule(module)
    tracer = EglTracer()
    tracer.traceApi(api)

    print r'''



/*
 * Several applications, such as Quake3, use dlopen("libGL.so.1"), but
 * LD_PRELOAD does not intercept symbols obtained via dlopen/dlsym, therefore
 * we need to intercept the dlopen() call here, and redirect to our wrapper
 * shared object.
예제 #5
0

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

    module = Module()
    module.mergeModule(cglapi)
    module.mergeModule(glapi)
    api = API()
    api.addModule(module)
    tracer = CglTracer()
    tracer.traceApi(api)

    print r"""

PUBLIC
void * gll_noop = 0;

"""
예제 #6
0
    print '#include <string.h>'
    print '#include <windows.h>'
    print
    print '#include <sstream>'
    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
    print 'static OS_THREAD_SPECIFIC(uintptr_t) _reentrant;'
    print
    print '// Helper class to track reentries in function scope.'
    print 'struct ReentryScope {'
    print 'inline ReentryScope() { _reentrant = 1; }'
    print 'inline ~ReentryScope() { _reentrant = 0; }'
    print '};'
    print
    module = Module()
    module.mergeModule(glapi)
    module.mergeModule(wglapi)
    api = API()
    api.addModule(module)
    tracer = WglTracer()
    tracer.traceApi(api)
예제 #7
0
#include <RegalSystem.h>

// Workaround for GLX emulation no supported for apitrace, yet

#if REGAL_SYS_OSX || REGAL_SYS_ANDROID
# 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)
예제 #8
0
파일: regaltrace.py 프로젝트: vvuk/regal
// Cass Everitt - 2013

#include <stdlib.h>
#include <string.h>

#include "trace_writer_regal.hpp"
#define localWriter regalWriter

#include "glproc.hpp"
#include "glsize.hpp"

#include <RegalSystem.h>
'''

    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)
예제 #9
0
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()

    module = Module()
    module.mergeModule(cglapi)
    module.mergeModule(glapi)
    api = API()
    api.addModule(module)
    tracer = CglTracer()
    tracer.traceApi(api)

    print(r'''

PUBLIC
void * gll_noop = 0;


__attribute__((constructor))
static void
_init(void) {