[PATCH v2 07/18] mt trace: create gltrace_state.cpp, move getContext into it

Imre Deak imre.deak at intel.com
Tue May 15 07:11:02 PDT 2012


There is no need to keep this function in a python script and the
following patches will extend the functionality around this code, so
move the function to a .cpp file.

Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 wrappers/CMakeLists.txt |    4 ++++
 wrappers/gltrace.py     |    8 --------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt
index a333504..b9e3eef 100644
--- a/wrappers/CMakeLists.txt
+++ b/wrappers/CMakeLists.txt
@@ -236,6 +236,7 @@ if (WIN32)
     add_library (wgltrace MODULE opengl32.def
         wgltrace.cpp
         glcaps.cpp
+        gltrace_state.cpp
     )
     add_dependencies (wgltrace glproc)
     target_link_libraries (wgltrace
@@ -269,6 +270,7 @@ elseif (APPLE)
     add_library (cgltrace SHARED
         cgltrace.cpp
         glcaps.cpp
+        gltrace_state.cpp
     )
 
     add_dependencies (cgltrace glproc)
@@ -309,6 +311,7 @@ elseif (X11_FOUND)
     add_library (glxtrace SHARED
         glxtrace.cpp
         glcaps.cpp
+        gltrace_state.cpp
     )
 
     add_dependencies (glxtrace glproc)
@@ -355,6 +358,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
     add_library (egltrace SHARED
         egltrace.cpp
         glcaps.cpp
+        gltrace_state.cpp
     )
 
     add_dependencies (egltrace glproc)
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
index 8180be3..25f1896 100644
--- a/wrappers/gltrace.py
+++ b/wrappers/gltrace.py
@@ -121,14 +121,6 @@ class GlTracer(Tracer):
         print '    VERTEX_ATTRIB_NV,'
         print '};'
         print
-        print 'gltrace::Context *'
-        print 'gltrace::getContext(void)'
-        print '{'
-        print '    // TODO return the context set by other APIs (GLX, EGL, and etc.)'
-        print '    static gltrace::Context _ctx = { gltrace::PROFILE_COMPAT, false, false, false };'
-        print '    return &_ctx;'
-        print '}'
-        print
         print 'static vertex_attrib _get_vertex_attrib(void) {'
         print '    gltrace::Context *ctx = gltrace::getContext();'
         print '    if (ctx->user_arrays_arb || ctx->user_arrays_nv) {'
-- 
1.7.5.4



More information about the apitrace mailing list