|
@@ -1025,7 +1025,7 @@ enum ImGuiBackendFlags_
|
|
|
ImGuiBackendFlags_HasGamepad = 1 << 0, // Back-end Platform supports gamepad and currently has one connected.
|
|
|
ImGuiBackendFlags_HasMouseCursors = 1 << 1, // Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
|
|
|
ImGuiBackendFlags_HasSetMousePos = 1 << 2, // Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).
|
|
|
- ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3 // Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bits indices.
|
|
|
+ ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3 // Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
|
|
|
};
|
|
|
|
|
|
// Enumeration for PushStyleColor() / PopStyleColor()
|
|
@@ -1727,7 +1727,7 @@ struct ImGuiListClipper
|
|
|
IMGUI_API void End(); // Automatically called on the last call of Step() that returns false.
|
|
|
};
|
|
|
|
|
|
-// Helpers macros to generate 32-bits encoded colors
|
|
|
+// Helpers macros to generate 32-bit encoded colors
|
|
|
#ifdef IMGUI_USE_BGRA_PACKED_COLOR
|
|
|
#define IM_COL32_R_SHIFT 16
|
|
|
#define IM_COL32_G_SHIFT 8
|
|
@@ -1791,13 +1791,13 @@ typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* c
|
|
|
|
|
|
// Typically, 1 command = 1 GPU draw call (unless command is a callback)
|
|
|
// Pre 1.71 back-ends will typically ignore the VtxOffset/IdxOffset fields. When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset'
|
|
|
-// is enabled, those fields allow us to render meshes larger than 64K vertices while keeping 16-bits indices.
|
|
|
+// is enabled, those fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
|
|
|
struct ImDrawCmd
|
|
|
{
|
|
|
unsigned int ElemCount; // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
|
|
|
ImVec4 ClipRect; // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
|
|
|
ImTextureID TextureId; // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
|
|
|
- unsigned int VtxOffset; // Start offset in vertex buffer. Pre-1.71 or without ImGuiBackendFlags_RendererHasVtxOffset: always 0. With ImGuiBackendFlags_RendererHasVtxOffset: may be >0 to support meshes larger than 64K vertices with 16-bits indices.
|
|
|
+ unsigned int VtxOffset; // Start offset in vertex buffer. Pre-1.71 or without ImGuiBackendFlags_RendererHasVtxOffset: always 0. With ImGuiBackendFlags_RendererHasVtxOffset: may be >0 to support meshes larger than 64K vertices with 16-bit indices.
|
|
|
unsigned int IdxOffset; // Start offset in index buffer. Always equal to sum of ElemCount drawn so far.
|
|
|
ImDrawCallback UserCallback; // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
|
|
|
void* UserCallbackData; // The draw callback code can access this.
|
|
@@ -1806,8 +1806,8 @@ struct ImDrawCmd
|
|
|
};
|
|
|
|
|
|
// Vertex index
|
|
|
-// (to allow large meshes with 16-bits indices: set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset in the renderer back-end)
|
|
|
-// (to use 32-bits indices: override with '#define ImDrawIdx unsigned int' in imconfig.h)
|
|
|
+// (to allow large meshes with 16-bit indices: set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' and handle ImDrawCmd::VtxOffset in the renderer back-end)
|
|
|
+// (to use 32-bit indices: override with '#define ImDrawIdx unsigned int' in imconfig.h)
|
|
|
#ifndef ImDrawIdx
|
|
|
typedef unsigned short ImDrawIdx;
|
|
|
#endif
|
|
@@ -1916,7 +1916,7 @@ struct ImDrawList
|
|
|
// Primitives
|
|
|
// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners.
|
|
|
IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f);
|
|
|
- IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4-bits corresponding to which corner to round
|
|
|
+ IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4 bits corresponding to which corner to round
|
|
|
IMGUI_API void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All); // a: upper-left, b: lower-right (== upper-left + size)
|
|
|
IMGUI_API void AddRectFilledMultiColor(const ImVec2& p_min, const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
|
|
|
IMGUI_API void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f);
|