# HG changeset patch # User Sebastien Jodogne # Date 1568967415 -7200 # Node ID d6b83ee3a950c82c0ebe5546a8a20e844b0585a5 # Parent 727f2007ca23ea80d1fbfbec1cc45f9966fede7d fix WebAssemblyOpenGLViewport::UpdateSize() diff -r 727f2007ca23 -r d6b83ee3a950 Framework/OpenGL/WebAssemblyOpenGLContext.cpp --- a/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Thu Sep 19 18:26:11 2019 +0200 +++ b/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Fri Sep 20 10:16:55 2019 +0200 @@ -189,7 +189,7 @@ canvasWidth_ = static_cast(boost::math::iround(w)); canvasHeight_ = static_cast(boost::math::iround(h)); } - + emscripten_set_canvas_element_size(canvas_.c_str(), canvasWidth_, canvasHeight_); } }; diff -r 727f2007ca23 -r d6b83ee3a950 Framework/Viewport/WebAssemblyViewport.cpp --- a/Framework/Viewport/WebAssemblyViewport.cpp Thu Sep 19 18:26:11 2019 +0200 +++ b/Framework/Viewport/WebAssemblyViewport.cpp Fri Sep 20 10:16:55 2019 +0200 @@ -43,9 +43,12 @@ void WebAssemblyOpenGLViewport::UpdateSize() { - if(compositor_.get() != NULL) + context_.UpdateSize(); // First read the size of the canvas + + if (compositor_.get() != NULL) + { compositor_->Refresh(); // Then refresh the content of the canvas - context_.UpdateSize(); // First read the size of the canvas + } } /*