]> git.cworth.org Git - apitrace/blobdiff - wrappers/gltrace.hpp
gltrace: Emit fake glViewport/glScissor calls the first time a context is bound.
[apitrace] / wrappers / gltrace.hpp
index 04c64b6afc0623ad690cbeb80ced17d3687de53f..dd8058cef4c42248075a9a1b3c74bbfdd7bc3940 100644 (file)
@@ -97,6 +97,9 @@ public:
     bool user_arrays_nv;
     unsigned retain_count;
 
+    // Whether it has been bound before
+    bool bound;
+
     // TODO: This will fail for buffers shared by multiple contexts.
     std::map <GLuint, Buffer> buffers;
 
@@ -105,7 +108,8 @@ public:
         user_arrays(false),
         user_arrays_arb(false),
         user_arrays_nv(false),
-        retain_count(0)
+        retain_count(0),
+        bound(false)
     { }
 
     inline bool