X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=wgltrace.py;h=4dfd0f4e32d2b865a43207a7abf7ac4dd242e0d5;hb=4644dc65e83c56ba0bb577f57cd20e7419f3ade4;hp=cf2cc97e401206cd45d630cc601efeda6882ff24;hpb=559d5349e8039871ff14509a26c54c980c8e2cc7;p=apitrace diff --git a/wgltrace.py b/wgltrace.py index cf2cc97..4dfd0f4 100644 --- a/wgltrace.py +++ b/wgltrace.py @@ -37,8 +37,8 @@ from codegen import * class WglTracer(GlTracer): - def wrap_ret(self, function, instance): - GlTracer.wrap_ret(self, function, instance) + def wrapRet(self, function, instance): + GlTracer.wrapRet(self, function, instance) if function.name == "wglGetProcAddress": print ' if (%s) {' % instance @@ -66,34 +66,9 @@ if __name__ == '__main__': print '#include ' print '#include ' print - print '#include "trace_writer.hpp"' + print '#include "trace_writer_local.hpp"' print '#include "os.hpp"' print - print ''' -static HINSTANCE g_hDll = NULL; - -PROC -__getPublicProcAddress(LPCSTR lpProcName) -{ - if (!g_hDll) { - char szDll[MAX_PATH] = {0}; - - if (!GetSystemDirectoryA(szDll, MAX_PATH)) { - return NULL; - } - - strcat(szDll, "\\\\opengl32.dll"); - - g_hDll = LoadLibraryA(szDll); - if (!g_hDll) { - return NULL; - } - } - - return GetProcAddress(g_hDll, lpProcName); -} - - ''' print '// To validate our prototypes' print '#define GL_GLEXT_PROTOTYPES' print '#define WGL_GLXEXT_PROTOTYPES' @@ -102,7 +77,7 @@ __getPublicProcAddress(LPCSTR lpProcName) print '#include "glsize.hpp"' print api = API() - api.add_api(glapi) - api.add_api(wglapi) + api.addApi(glapi) + api.addApi(wglapi) tracer = WglTracer() tracer.trace_api(api)