Skip to content

Commit 3741aff

Browse files
committed
Docs: reworked Changelog, comments.
1 parent c5bc3ba commit 3741aff

6 files changed

Lines changed: 206 additions & 171 deletions

File tree

docs/CHANGELOG.txt

Lines changed: 188 additions & 151 deletions
Large diffs are not rendered by default.

imgui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
396396
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
397397
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
398398

399-
2026/06/XX (1.XXXX) - merged ImDrawListFlags into ImDrawFlags. obsoleted ImDrawListFlags (which were rarely used directly):
399+
2026/07/XX (1.93.0) - merged ImDrawListFlags into ImDrawFlags. obsoleted ImDrawListFlags (which were rarely used directly):
400400
- ImDrawListFlags_AntiAliasedLines -> ImDrawFlags_AALines,
401401
- ImDrawListFlags_AntiAliasedFill -> ImDrawFlags_AAFill,
402402
- ImDrawListFlags_AllowVtxOffset -> ImDrawFlags_UseVtxOffset,

imgui.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ enum ImDrawFlags_
34533453
ImDrawFlags_SquareCap = 1 << 11, // OK -- // PathStroke(), AddPolyline(): use square cap line ends.
34543454

34553455
// About Stroke Ends:
3456-
// - Rendering is optimized for fast pixel-perfect UI, so line ends are not anti-aliased by default. It cheaper (we can emit less vertices).
3456+
// - Rendering is optimized for fast pixel-perfect UI, so line ends are not anti-aliased by default. It's cheaper (we can emit less vertices).
34573457
// - For more free-form drawings, light graphs and markers, or when using thick strokes: you can turn them on using the ImDrawFlags_AALineEnds flag.
34583458
// - See 'Demo->Examples->Custom Rendering' to interactively toy with those flags.
34593459
// - 'OK*' indicates using this at the AddXXX() call site is unlikely: it would only makes sense if (1) the option is disabled in style/scope and (2) you want to forcefully enable it for a single primitives. Possible but unlikely! Only supported for functions taking flags inputs.
@@ -3465,12 +3465,12 @@ enum ImDrawFlags_
34653465
//ImDrawFlags_NoAALineEnds = 1 << 16, // OK -- // Disable anti-aliasing ends for a given primitive.
34663466

34673467
// About Stroke Position:
3468-
// - Read https://github.com/ocornut/imgui/wiki/Draw-List
3468+
// - Read https://github.com/ocornut/imgui/wiki/Draw-List (this guide includes a precise list of differences between 1.92.9 and 1.93.0)
34693469
// - Read https://github.com/ocornut/imgui/wiki/Pixel-Perfect-Rendering
34703470
// Stroke Position relative to shape outline -- // Prim/Scope?
34713471
ImDrawFlags_StrokeInside = 1 << 17, // OK -- // Draw stroke inside of the shape outline (default for closed shapes and AddLineH, AddLineV functions)
34723472
ImDrawFlags_StrokeCenter = 2 << 17, // OK -- // Draw stroke at the center of the shape outline (default for paths, bezier, and AddLine functions)
3473-
ImDrawFlags_StrokeCenterBiased = 3 << 17, // OK -- // Draw stroke at the center of the shape outline, so that half thickness rounded down will be outside, and rest inside the shape outline. Useful for axis-aligned shapes: AddLineH, AddLineV, AddRect. Does not animate well!
3473+
ImDrawFlags_StrokeCenterBiased = 3 << 17, // OK -- // Draw stroke at the center of the shape outline, so that half thickness rounded down will be outside, and the rest inside the shape outline. Useful for axis-aligned shapes: AddLineH, AddLineV, AddRect. Does not animate well!
34743474
ImDrawFlags_StrokeOutside = 4 << 17, // OK -- // Draw stroke outside of the shape outline
34753475
ImDrawFlags_StrokeLegacy = 7 << 17, // OK OK(0) // Use legacy positioning + enable MiterOnly + disable AALineEnds. Must be all bits set.
34763476

@@ -3484,8 +3484,8 @@ enum ImDrawFlags_
34843484
ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone, // [Internal]
34853485
ImDrawFlags_AllowInPushScope_ = ImDrawFlags_AAFill | ImDrawFlags_AALines | ImDrawFlags_AALineEnds | ImDrawFlags_StrokeLegacy | ImDrawFlags_TextNoPixelSnap | ImDrawFlags_UseTexForRoundCorners | ImDrawFlags_UseVtxOffset | ImDrawFlags_RoundCornersMask_, // [Internal] Values allowed in PushDrawFlag() scope.
34863486
ImDrawFlags_AllowInFrameScope_ = ImDrawFlags_AllowInPushScope_ | ImDrawFlags_AllowTexForRoundCorners_,
3487-
ImDrawFlags_StrokeMask_ = 0x07 << 17, // [Internal]
3488-
ImDrawFlags_InvalidMask_ = ~0x7FFFFFF0, // [Internal] == 0x8000000F. Reserved to detect misuses.
3487+
ImDrawFlags_StrokeMask_ = 0x07 << 17, // [Internal]
3488+
ImDrawFlags_InvalidMask_ = ~0x7FFFFFF0, // [Internal] == 0x8000000F. Reserved to detect misuses.
34893489
};
34903490

34913491
// Draw command list
@@ -3672,7 +3672,7 @@ struct ImDrawList
36723672
IMGUI_API void _AddRectTinyRounding(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, float thickness, ImDrawFlags flags);
36733673
IMGUI_API void _SelectLineTexture(float screen_thickness, ImVec2* out_uv0, ImVec2* out_uv1, float* out_fringe, ImDrawFlags flags);
36743674
IMGUI_API float _CalculateCenterBiasedOffset(float thickness);
3675-
IMGUI_API void _AddPolyline(const ImVec2* points, int num_points, ImU32 col, float thickness, ImDrawFlags flags, float max_inner_thickness);
3675+
IMGUI_API void _AddPolyline(const ImVec2* points, int num_points, ImU32 col, float thickness, ImDrawFlags flags, float max_inner_offset);
36763676
};
36773677

36783678
// All draw data to render a Dear ImGui frame
@@ -3889,7 +3889,7 @@ enum ImFontAtlasFlags_
38893889
ImFontAtlasFlags_None = 0,
38903890
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, // Don't round the height to next power of two
38913891
ImFontAtlasFlags_NoMouseCursors = 1 << 1, // Don't build software mouse cursors into the atlas (save a little texture memory)
3892-
ImFontAtlasFlags_NoBakedLines = 1 << 2, // [OBSOLETE] Don't build line textures into the atlas (save a little texture memory). SINCE 1.93.0 THIS PREVENT ANTI-ALIASED STROKES FROM WORKING AND WILL DISABLE AA.
3892+
ImFontAtlasFlags_NoBakedLines = 1 << 2, // Don't build anti-aliased line textures into the atlas (save a little texture memory). SINCE 1.93.0 THIS PREVENTS ANTI-ALIASED LINES FROM WORKING AND WILL DISABLE THEM.
38933893
ImFontAtlasFlags_NoBakedRoundCorners= 1 << 3, // Don't build round corners into the atlas.
38943894
};
38953895

@@ -4556,7 +4556,7 @@ enum ImDrawListFlags_
45564556
ImDrawListFlags_None = ImDrawFlags_None,
45574557
ImDrawListFlags_AntiAliasedFill = ImDrawFlags_AAFill,
45584558
ImDrawListFlags_AntiAliasedLines = ImDrawFlags_AALines,
4559-
ImDrawListFlags_AntiAliasedLinesUseTex = 0, // Only apply to StrokeLegacy mode!
4559+
ImDrawListFlags_AntiAliasedLinesUseTex = ImDrawFlags_AALines, // No effect, anti-aliased rendering always uses textures from 1.93+
45604560
ImDrawListFlags_AllowVtxOffset = ImDrawFlags_UseVtxOffset,
45614561
ImDrawListFlags_TextNoPixelSnap = ImDrawFlags_TextNoPixelSnap,
45624562
};

imgui_demo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10474,8 +10474,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
1047410474
ImGui::CheckboxFlags("AALineEnds", &prim_other_flags, ImDrawFlags_AALineEnds); ImGui::SameLine();
1047510475
ImGui::CheckboxFlags("MiterOnly", &prim_other_flags, ImDrawFlags_MiterOnly); ImGui::SameLine();
1047610476
ImGui::CheckboxFlags("SquareCap", &prim_other_flags, ImDrawFlags_SquareCap);
10477-
//ImGui::CheckboxFlags("UseTexForRoundCorners", &prim_other_flags, ImDrawFlags_UseTexForRoundCorners); ImGui::SameLine();
10478-
//ImGui::CheckboxFlags("UseTexForStrokeLegacy", &prim_other_flags, ImDrawFlags_UseTexForStrokeLegacy);
10477+
//ImGui::CheckboxFlags("UseTexForRoundCorners", &prim_other_flags, ImDrawFlags_UseTexForRoundCorners);
1047910478

1048010479
static ImDrawFlags scope_flags = draw_list->Flags & ImDrawFlags_AllowInPushScope_; // First init copy current state.
1048110480
ImGui::SeparatorText("Current ImDrawList flags (e.g. PushDrawFlag function)");
@@ -10484,8 +10483,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
1048410483
ImGui::CheckboxFlags("AALines", &scope_flags, ImDrawFlags_AALines); ImGui::SameLine();
1048510484
ImGui::CheckboxFlags("AALineEnds", &scope_flags, ImDrawFlags_AALineEnds); ImGui::SameLine();
1048610485
ImGui::CheckboxFlags("StrokeLegacy", &scope_flags, ImDrawFlags_StrokeLegacy);
10487-
//ImGui::CheckboxFlags("UseTexForRoundCorners", &scope_flags, ImDrawFlags_UseTexForRoundCorners); ImGui::SameLine();
10488-
//ImGui::CheckboxFlags("UseTexForStrokeLegacy", &scope_flags, ImDrawFlags_UseTexForStrokeLegacy);
10486+
//ImGui::CheckboxFlags("UseTexForRoundCorners", &scope_flags, ImDrawFlags_UseTexForRoundCorners);
1048910487
ImGui::PopID();
1049010488
ImGui::Spacing();
1049110489

@@ -10508,7 +10506,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
1050810506
for (int side = 0; side < 4; side++)
1050910507
{
1051010508
float t = (float)ImGui::GetTime() * 0.1f + side * pi * 0.5f;
10511-
rotating_square[side] = { (float)cosf(t) * half_sz, (float)sin(t) * half_sz };
10509+
rotating_square[side] = { (float)cosf(t) * half_sz, (float)sinf(t) * half_sz };
1051210510
}
1051310511

1051410512
float x = start_pos.x;

imgui_draw.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4840,7 +4840,7 @@ static void ImFontAtlasBuildUpdateTexDataBasic(ImFontAtlas* atlas)
48404840

48414841
static int InitCornerGeometry(float cx, float cy, float rounding, float circle_segment_max_error, ImVec2* line_normals, float* line_distances)
48424842
{
4843-
// This tries to quite faithfully replication how we render the corners using tessellation.
4843+
// This tries to quite faithfully replicate how we render the corners using tessellation.
48444844
// Older code sampled a circle SDF directly, but it had clearly visible discrepancy between the baked corners
48454845
// and tessellated corners due to circle_segment_max_error.
48464846

@@ -5089,9 +5089,9 @@ static void ImFontAtlasBuildUpdateTexDataLines(ImFontAtlas* atlas)
50895089
}
50905090

50915091
{
5092-
// Calculate super sampled lin textures for smaller line widths to make transition between sizes smoother.
5092+
// Calculate super sampled line textures for smaller line widths to make transition between sizes smoother.
50935093

5094-
// Calc ramp used for all the textures.
5094+
// Calculate ramp used for all the textures.
50955095
ImU8 ramp[IM_DRAWLIST_TEX_LINES_SAMPLE_COUNT];
50965096
for (int n = 0; n < IM_DRAWLIST_TEX_LINES_SAMPLE_COUNT; n++)
50975097
ramp[n] = (ImU8)(((float)n / IM_DRAWLIST_TEX_LINES_SAMPLE_COUNT) * 255.0f);
@@ -5108,7 +5108,7 @@ static void ImFontAtlasBuildUpdateTexDataLines(ImFontAtlas* atlas)
51085108
// To super 2x sample that signal, we end up with following texture:
51095109
// [ 0 | .5 | 1 | .5 | 0 ]
51105110
// :.......................:
5111-
// One might think that there should be 2 opaque pixels the the middle section, but no singe we're super sampling the triangle signal.
5111+
// One might think that there should be 2 opaque pixels in the middle section, but no since we're super sampling the triangle signal.
51125112
const int line_width = 1 + n;
51135113
IM_ASSERT(IM_DRAWLIST_TEX_LINES_SAMPLE_COUNT + line_width + IM_DRAWLIST_TEX_LINES_SAMPLE_COUNT <= r.w && y < r.h); // Make sure we're inside the texture bounds before we start writing pixels
51145114

imgui_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : (x > 0.0f
515515
inline double ImSign(double x) { return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
516516
#ifdef IMGUI_ENABLE_SSE
517517
inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
518-
// Converge to more precise solution using single step of Newton-Raphson method, repeating increase precision
518+
// Converge to more precise solution using single step of Newton-Raphson method, repeating increases precision
519519
inline float ImRsqrtPrecise(float x) { const float r = _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); return r * (1.5f - x * 0.5f * r * r); }
520520
#else
521521
inline float ImRsqrt(float x) { return 1.0f / sqrtf(x); }
@@ -922,7 +922,7 @@ IMGUI_API ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStorag
922922
#define IM_DRAWLIST_ARCFAST_SAMPLE_MAX IM_DRAWLIST_ARCFAST_TABLE_SIZE // Sample index _PathArcToFastEx() for 360 angle.
923923

924924
#ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX
925-
#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32) // The maximum line width to bake anti-aliased textures for. Build atlas with ImFontAtlasFlags_NoBakedLines to disable baking.
925+
#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32) // The maximum line width to bake anti-aliased textures for.
926926
#endif
927927
#ifndef IM_DRAWLIST_TEX_LINES_DETAILED_WIDTH
928928
#define IM_DRAWLIST_TEX_LINES_DETAILED_WIDTH (4) // Calculate detailed textures for width [1..IM_DRAWLIST_TEX_LINES_DETAILED_WIDTH]

0 commit comments

Comments
 (0)