mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
ImGui: Process texture ops even when minimized. (#3506)
This commit is contained in:
committed by
GitHub
parent
09ad5b2340
commit
4a28b87897
@@ -67,15 +67,6 @@ struct OcornutImguiContext
|
||||
{
|
||||
void render(ImDrawData* _drawData)
|
||||
{
|
||||
// Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
|
||||
int32_t dispWidth = int32_t(_drawData->DisplaySize.x * _drawData->FramebufferScale.x);
|
||||
int32_t dispHeight = int32_t(_drawData->DisplaySize.y * _drawData->FramebufferScale.y);
|
||||
if (dispWidth <= 0
|
||||
|| dispHeight <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (NULL != _drawData->Textures)
|
||||
{
|
||||
for (ImTextureData* texData : *_drawData->Textures)
|
||||
@@ -140,6 +131,15 @@ struct OcornutImguiContext
|
||||
}
|
||||
}
|
||||
|
||||
// Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
|
||||
int32_t dispWidth = int32_t(_drawData->DisplaySize.x * _drawData->FramebufferScale.x);
|
||||
int32_t dispHeight = int32_t(_drawData->DisplaySize.y * _drawData->FramebufferScale.y);
|
||||
if (dispWidth <= 0
|
||||
|| dispHeight <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bgfx::setViewName(m_viewId, "ImGui");
|
||||
bgfx::setViewMode(m_viewId, bgfx::ViewMode::Sequential);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user