X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglretrace_ws.cpp;h=d1e85f824d08815d4a511c06197725051e85062d;hb=ee0fdfe385b70d95b3c3d590468fa6e329bf2cc7;hp=ac03fcc97de6d56390f807a3b1661e6571d489c1;hpb=4647f208f5a2b87391281e0f1202f66c23943bd9;p=apitrace diff --git a/retrace/glretrace_ws.cpp b/retrace/glretrace_ws.cpp index ac03fcc..d1e85f8 100644 --- a/retrace/glretrace_ws.cpp +++ b/retrace/glretrace_ws.cpp @@ -131,7 +131,7 @@ Context::~Context() } -static thread_specific Context * +static OS_THREAD_SPECIFIC_PTR(Context) currentContextPtr; @@ -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(attribs); + const trace::Array *attribs_ = attribs ? attribs->toArray() : NULL; if (attribs_) { for (size_t i = 0; i + 1 < attribs_->values.size(); i += 2) {