]> git.cworth.org Git - apitrace/blobdiff - wgltrace.py
Retrace eglCreatePbufferSurface and eglDestroySurface properly.
[apitrace] / wgltrace.py
index ddc1f276c3c2c074800f2d97439103c22c2cc888..9dab406360918a11aaaadccc988c78b576b57463 100644 (file)
@@ -53,7 +53,7 @@ class WglTracer(GlTracer):
                 print '    %s = (%s)&%s;' % (instance, function.type, f.name);
         
             def handle_default():
-                print '    os::DebugMessage("apitrace: warning: unknown function \\"%s\\"\\n", lpszProc);'
+                print '    os::log("apitrace: warning: unknown function \\"%s\\"\\n", lpszProc);'
 
             string_switch('lpszProc', func_dict.keys(), handle_case, handle_default)
             print '    }'
@@ -66,34 +66,9 @@ if __name__ == '__main__':
     print '#include <string.h>'
     print '#include <windows.h>'
     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'