From d1c073a19981aa6c1bd0064e951d4b180d5e19f5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 31 May 2016 00:00:44 +0200 Subject: [PATCH] Comments, tweaks --- README.md | 2 +- imgui.cpp | 9 ++++----- imgui_demo.cpp | 2 +- imgui_internal.h | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9e32e9e26..8a9eab157 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ ImGui is very programmer centric and the immediate-mode GUI paradigm might requi Is ImGui fast? -Probably fast enough for most uses. Down to the fundation of its visual design, ImGui is engineered to be fairly performant both in term of CPU and GPU usage. Running elaborate code and creating elaborate UI will of course have a cost but ImGui aims to minimize it. +Probably fast enough for most uses. Down to the foundation of its visual design, ImGui is engineered to be fairly performant both in term of CPU and GPU usage. Running elaborate code and creating elaborate UI will of course have a cost but ImGui aims to minimize it. Mileage may vary but the following screenshot can give you a rough idea of the cost of running and rendering UI code (In the case of a trivial demo application like this one, your driver/os setup are likely to be the bottleneck. Testing performance as part of a real application is recommended). diff --git a/imgui.cpp b/imgui.cpp index 83a0ec5d0..3787d1b4f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -610,7 +610,6 @@ #include "imgui_internal.h" #include // toupper, isprint -#include // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf #include // NULL, malloc, free, qsort, atoi #include // vsnprintf, sscanf, printf #include // INT_MIN, INT_MAX @@ -9129,10 +9128,10 @@ void ImGui::EndGroup() } // Gets back to previous line and continue with horizontal layout -// pos_x == 0 : follow on previous item -// pos_x != 0 : align to specified column -// spacing_w < 0 : use default spacing if column_x==0, no spacing if column_x!=0 -// spacing_w >= 0 : enforce spacing +// pos_x == 0 : follow right after previous item +// pos_x != 0 : align to specified x position +// spacing_w < 0 : use default spacing if pos_x == 0, no spacing if pos_x != 0 +// spacing_w >= 0 : enforce spacing amount void ImGui::SameLine(float pos_x, float spacing_w) { ImGuiWindow* window = GetCurrentWindow(); diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 5117c7fc7..e7487f6bb 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -11,7 +11,7 @@ #include "imgui.h" #include // toupper, isprint -#include // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf +#include // sqrtf, powf, cosf, sinf, floorf, ceilf #include // vsnprintf, sscanf, printf #include // NULL, malloc, free, qsort, atoi #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier diff --git a/imgui_internal.h b/imgui_internal.h index a427a5fdb..28fb93e98 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -12,7 +12,7 @@ #endif #include // FILE* -#include // sqrtf() +#include // sqrtf, fabsf, fmodf, powf, floorf, ceilf, cosf, sinf #ifdef _MSC_VER #pragma warning (push)