]> git.cworth.org Git - apitrace/blobdiff - wgltrace.py
Trace enum signatures as a whole.
[apitrace] / wgltrace.py
index 17d1acc7b6a054570767b0ff3c4a33c7aa955da0..d5a5248f9e1a018738a5da22ea898ae03147c6f9 100644 (file)
@@ -27,9 +27,9 @@
 """WGL tracing code generator."""
 
 
-from stdapi import API
-from glapi import glapi
-from wglapi import wglapi
+from specs.stdapi import API
+from specs.glapi import glapi
+from specs.wglapi import wglapi
 from dispatch import function_pointer_type, function_pointer_value
 from gltrace import GlTracer
 from codegen import *
@@ -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 '    }'
@@ -69,31 +69,6 @@ if __name__ == '__main__':
     print '#include "trace_writer.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'