diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-11-20 11:22:25 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-11-20 11:22:25 +0000 |
commit | 885f265065244d05fd158d71d27b6fbaba5a2212 (patch) | |
tree | 07520f14756c1168915604e5071ea84482ae50b7 /trace_model.cpp | |
parent | c9edb83044ae17a35c42c10504ffffd0f12f3598 (diff) |
Support glTexImage through blobs.
Diffstat (limited to 'trace_model.cpp')
-rw-r--r-- | trace_model.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/trace_model.cpp b/trace_model.cpp index b832587..be2293d 100644 --- a/trace_model.cpp +++ b/trace_model.cpp @@ -62,6 +62,10 @@ void Array::visit(Visitor &visitor) { visitor.visit(this); } +void Blob::visit(Visitor &visitor) { + visitor.visit(this); +} + class Dumper : public Visitor { @@ -109,6 +113,10 @@ public: } os << "}"; } + + void visit(Blob *blob) { + os << "... " << blob->size; + } }; @@ -167,6 +175,12 @@ const Value & Value::operator[](size_t index) const { return void_; } +Value::operator void *(void) const { + const Blob *blob = dynamic_cast<const Blob *>(unwrap(this)); + assert(blob); + return blob->buf; +} + Value & Call::arg(const char *name) { for (std::list<Arg>::iterator it = args.begin(); it != args.end(); ++it) { if (it->first == name) { |