]> git.cworth.org Git - apitrace/blobdiff - trace_write.hpp
Handle vertex attriv locations correctly.
[apitrace] / trace_write.hpp
index 428b30fa55e222bf449f6621907d5484d8b070f3..8797e56f835c667dbd7754d70b8ef96891064e20 100644 (file)
  *
  **************************************************************************/
 
+/*
+ * Trace writing functions.
+ */
+
 #ifndef _TRACE_WRITE_HPP_
 #define _TRACE_WRITE_HPP_
 
+#include <stddef.h>
+
 namespace Trace {
 
     typedef unsigned Id;
@@ -37,6 +43,13 @@ namespace Trace {
         const char **args;
     };
 
+    struct StructSig {
+        Id id;
+        const char *name;
+        unsigned num_members;
+        const char **members;
+    };
+
     struct EnumSig {
         Id id;
         const char *name;
@@ -56,13 +69,13 @@ namespace Trace {
 
     void Open(void);
     void Close(void);
-    
+
     unsigned BeginEnter(const FunctionSig &function);
     void EndEnter(void);
-    
+
     void BeginLeave(unsigned call);
     void EndLeave(void);
-    
+
     void BeginArg(unsigned index);
     inline void EndArg(void) {}
 
@@ -75,17 +88,14 @@ namespace Trace {
     inline void BeginElement(void) {}
     inline void EndElement(void) {}
 
-    void BeginStruct(size_t length);
+    void BeginStruct(const StructSig *sig);
     inline void EndStruct(void) {}
 
-    void BeginMember(const char *name);
-    inline void EndMember(void) {}
-
     void LiteralBool(bool value);
     void LiteralSInt(signed long long value);
     void LiteralUInt(unsigned long long value);
     void LiteralFloat(float value);
-    void LiteralFloat(double value);
+    void LiteralDouble(double value);
     void LiteralString(const char *str);
     void LiteralString(const char *str, size_t size);
     void LiteralWString(const wchar_t *str);