]> git.cworth.org Git - apitrace/blobdiff - wrappers/gltrace.hpp
d3dretrace: Dump D3D10 depth stencil surfaces as float.
[apitrace] / wrappers / gltrace.hpp
index 55c1dcc2691d81be1ae7213e973a7cf7b6188c79..dd8058cef4c42248075a9a1b3c74bbfdd7bc3940 100644 (file)
@@ -77,14 +77,14 @@ public:
     void
     bufferSubData(GLsizeiptr offset, GLsizeiptr length, const void *new_data) {
         if (offset >= 0 && offset < size && length > 0 && offset + length <= size && new_data) {
-            memcpy((uint8_t *)data + offset, new_data, length);
+            memcpy((GLubyte *)data + offset, new_data, length);
         }
     }
 
     void
     getSubData(GLsizeiptr offset, GLsizeiptr length, void *out_data) {
         if (offset >= 0 && offset < size && length > 0 && offset + length <= size && out_data) {
-            memcpy(out_data, (uint8_t *)data + offset, length);
+            memcpy(out_data, (GLubyte *)data + offset, length);
         }
     }
 };
@@ -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