Examples: DirectX10/11/12, Allegro, Marmalade: Render functions early out when display size is zero (minimized). (#2496)

This commit is contained in:
omar
2019-04-15 18:47:36 +02:00
parent 1fe6533192
commit 8130fd9816
6 changed files with 21 additions and 0 deletions

View File

@ -59,6 +59,10 @@ struct VERTEX_CONSTANT_BUFFER
// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data)
{
// Avoid rendering when minimized
if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
return;
ID3D10Device* ctx = g_pd3dDevice;
// Create and grow vertex/index buffers if needed