]> git.cworth.org Git - apitrace/blobdiff - retrace/glretrace.hpp
glretrace: Put currentContext on TLS.
[apitrace] / retrace / glretrace.hpp
index 7729ec50a66303047136631745d22b0e34978cbb..90c4c81693419233af27686eddcd8d23db4475f7 100644 (file)
@@ -35,6 +35,7 @@ namespace glretrace {
 struct Context {
     Context(glws::Context* context)
         : wsContext(context),
+          drawable(0),
           activeProgram(0),
           used(false)
     {
@@ -46,6 +47,10 @@ struct Context {
     }
 
     glws::Context* wsContext;
+
+    // Bound drawable
+    glws::Drawable *drawable;
+
     GLuint activeProgram;
     bool used;
     
@@ -60,8 +65,13 @@ extern bool insideList;
 extern bool insideGlBeginEnd;
 
 
-extern glws::Drawable *currentDrawable;
-extern Context *currentContext;
+Context *
+getCurrentContext(void);
+
+
+int
+parseAttrib(const trace::Value *attribs, int param, int default_);
+
 
 glws::Drawable *
 createDrawable(glws::Profile profile);