Skip to content

Commit 223765b

Browse files
committed
ImGui: Process texture ops even when minimized.
1 parent d396404 commit 223765b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/common/imgui/imgui.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ struct OcornutImguiContext
6767
{
6868
void render(ImDrawData* _drawData)
6969
{
70-
// Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
71-
int32_t dispWidth = int32_t(_drawData->DisplaySize.x * _drawData->FramebufferScale.x);
72-
int32_t dispHeight = int32_t(_drawData->DisplaySize.y * _drawData->FramebufferScale.y);
73-
if (dispWidth <= 0
74-
|| dispHeight <= 0)
75-
{
76-
return;
77-
}
78-
7970
if (NULL != _drawData->Textures)
8071
{
8172
for (ImTextureData* texData : *_drawData->Textures)
@@ -140,6 +131,15 @@ struct OcornutImguiContext
140131
}
141132
}
142133

134+
// Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
135+
int32_t dispWidth = int32_t(_drawData->DisplaySize.x * _drawData->FramebufferScale.x);
136+
int32_t dispHeight = int32_t(_drawData->DisplaySize.y * _drawData->FramebufferScale.y);
137+
if (dispWidth <= 0
138+
|| dispHeight <= 0)
139+
{
140+
return;
141+
}
142+
143143
bgfx::setViewName(m_viewId, "ImGui");
144144
bgfx::setViewMode(m_viewId, bgfx::ViewMode::Sequential);
145145

0 commit comments

Comments
 (0)