]> git.cworth.org Git - apitrace/commitdiff
Split glxapi.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 25 Nov 2010 20:32:59 +0000 (20:32 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 25 Nov 2010 20:32:59 +0000 (20:32 +0000)
CMakeLists.txt
glxapi.py [new file with mode: 0644]
glxtrace.py

index 64c0f538c7628d1f60b1b729f7ed85cca58104f5..2fc59ee3d9970f4b932b06c07eda3fa1add9959c 100644 (file)
@@ -134,7 +134,7 @@ if (WIN32)
        add_custom_command (
                OUTPUT opengl32.cpp
                COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/opengl32.cpp
-               DEPENDS wgltrace.py trace.py wglapi.py glenum.py glapi.py glenum.py winapi.py stdapi.py
+               DEPENDS wgltrace.py trace.py wglapi.py glapi.py glenum.py winapi.py stdapi.py
        )
        add_library (opengl SHARED opengl32.def opengl32.cpp log.cpp os_win32.cpp)
        set_target_properties (opengl PROPERTIES
@@ -150,7 +150,7 @@ else ()
        add_custom_command (
                OUTPUT glxtrace.cpp
                COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
-               DEPENDS glxtrace.py trace.py glapi.py glenum.py stdapi.py
+               DEPENDS glxtrace.py trace.py glxapi.py glapi.py glenum.py stdapi.py
        )
 
        add_library (glxtrace SHARED glxtrace.cpp log.cpp os_posix.cpp)
diff --git a/glxapi.py b/glxapi.py
new file mode 100644 (file)
index 0000000..b58e471
--- /dev/null
+++ b/glxapi.py
@@ -0,0 +1,41 @@
+##########################################################################
+#
+# Copyright 2008-2009 VMware, Inc.
+# All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# 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 stdapi import *
+from glapi import glapi
+
+
+glxapi = API("GLX")
+
+PROC = Opaque("__GLXextFuncPtr")
+
+glxapi.add_functions(glapi.functions)
+glxapi.add_functions([
+    Function(PROC, "glXGetProcAddressARB", [(Alias("const GLubyte *", CString), "procName")]),
+    Function(PROC, "glXGetProcAddress", [(Alias("const GLubyte *", CString), "procName")]),
+])
+
+
index 27298447165d7977c1c5d5a6dd874c5b86a54a88..b8cd151a6f43141c1782db2c76e8e7107678aa33 100644 (file)
@@ -1,6 +1,6 @@
 ##########################################################################
 #
-# Copyright 2008-2009 VMware, Inc.
+# Copyright 2008-2010 VMware, Inc.
 # All Rights Reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 ##########################################################################/
 
 
-from stdapi import *
-from glapi import glapi
-import trace
+from glxapi import glxapi
+from trace import Tracer
 
 
-glxapi = API("GLX")
-
-PROC = Opaque("__GLXextFuncPtr")
-
-glxapi.add_functions(glapi.functions)
-glxapi.add_functions([
-    Function(PROC, "glXGetProcAddressARB", [(Alias("const GLubyte *", CString), "procName")]),
-    Function(PROC, "glXGetProcAddress", [(Alias("const GLubyte *", CString), "procName")]),
-])
-
-
-class GlxTracer(trace.Tracer):
+class GlxTracer(Tracer):
 
     def get_function_address(self, function):
         if function.name.startswith("glXGetProcAddress"):