File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments