comparison Framework/Viewport/WebAssemblyViewport.cpp @ 997:d6b83ee3a950

fix WebAssemblyOpenGLViewport::UpdateSize()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Sep 2019 10:16:55 +0200
parents 91f827272c1f
children 6a9300ecfa13
comparison
equal deleted inserted replaced
996:727f2007ca23 997:d6b83ee3a950
41 RegisterContextCallbacks(); 41 RegisterContextCallbacks();
42 } 42 }
43 43
44 void WebAssemblyOpenGLViewport::UpdateSize() 44 void WebAssemblyOpenGLViewport::UpdateSize()
45 { 45 {
46 if(compositor_.get() != NULL) 46 context_.UpdateSize(); // First read the size of the canvas
47
48 if (compositor_.get() != NULL)
49 {
47 compositor_->Refresh(); // Then refresh the content of the canvas 50 compositor_->Refresh(); // Then refresh the content of the canvas
48 context_.UpdateSize(); // First read the size of the canvas 51 }
49 } 52 }
50 53
51 /* 54 /*
52 typedef EM_BOOL (*em_webgl_context_callback)(int eventType, const void *reserved, void *userData); 55 typedef EM_BOOL (*em_webgl_context_callback)(int eventType, const void *reserved, void *userData);
53 56