don't set screen size for WASM builds

pull/3471/head
kallaballa 2 years ago
parent 396b7ad0b8
commit f3edcf3dc2
  1. 2
      modules/v4d/src/detail/nanoguicontext.cpp

@ -29,7 +29,9 @@ NanoguiContext::NanoguiContext(FrameBufferContext& fbContext) :
screen_ = new nanogui::Screen();
screen_->initialize(fbCtx().getGLFWWindow(), false);
Size winSize = fbContext.getV4D().getWindowSize();
#ifndef __EMSCRIPTEN__
screen_->set_size({int(winSize.width / fbContext.getV4D().pixelRatioX()), int(winSize.height / fbContext.getV4D().pixelRatioY())});
#endif
fbCtx().setWindowSize(fbCtx().size());
context_ = screen_->nvg_context();
form_ = new cv::v4d::FormHelper(screen_);

Loading…
Cancel
Save