]> git.cworth.org Git - apitrace/blobdiff - retrace/glretrace_ws.cpp
retracediff: Support floating point images.
[apitrace] / retrace / glretrace_ws.cpp
index 94a0d931ad008ad886ee08d55c4285f1b6312841..d1e85f824d08815d4a511c06197725051e85062d 100644 (file)
@@ -214,6 +214,9 @@ updateDrawable(int width, int height) {
         return;
     }
 
+    width  = std::max(width,  currentDrawable->width);
+    height = std::max(height, currentDrawable->height);
+
     // Check for bound framebuffer last, as this may have a performance impact.
     GLint draw_framebuffer = 0;
     glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &draw_framebuffer);
@@ -230,7 +233,7 @@ updateDrawable(int width, int height) {
 
 int
 parseAttrib(const trace::Value *attribs, int param, int default_ = 0) {
-    const trace::Array *attribs_ = dynamic_cast<const trace::Array *>(attribs);
+    const trace::Array *attribs_ = attribs ? attribs->toArray() : NULL;
 
     if (attribs_) {
         for (size_t i = 0; i + 1 < attribs_->values.size(); i += 2) {