| 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 | { |