MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / UpdateSize

Method UpdateSize

Plugins/NativeEngine/Source/NativeEngine.cpp:605–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603 }
604
605 void NativeEngine::UpdateSize(size_t width, size_t height)
606 {
607 const auto w = static_cast<uint16_t>(width);
608 const auto h = static_cast<uint16_t>(height);
609
610 auto bgfxStats = bgfx::getStats();
611 if (w != bgfxStats->width || h != bgfxStats->height)
612 {
613 bgfx::reset(w, h, BGFX_RESET_FLAGS);
614 bgfx::setViewRect(0, 0, 0, w, h);
615#ifdef __APPLE__
616 bgfx::frame();
617#else
618 bgfx::touch(0);
619#endif
620 }
621 }
622
623 FrameBufferManager& NativeEngine::GetFrameBufferManager()
624 {

Callers 1

NativeEngineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected