|
@@ -285,7 +285,21 @@ Type
|
|
PImDrawListSplitter = ^ImDrawListSplitter;
|
|
PImDrawListSplitter = ^ImDrawListSplitter;
|
|
PImDrawListSharedData = ^ImDrawListSharedData;
|
|
PImDrawListSharedData = ^ImDrawListSharedData;
|
|
PImDrawList = ^ImDrawList;
|
|
PImDrawList = ^ImDrawList;
|
|
- ImDrawIdx = ImU16;
|
|
|
|
|
|
+ PPImDrawList = ^PImDrawList;
|
|
|
|
+
|
|
|
|
+ //---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
|
|
|
+ // Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
|
|
|
+ // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
|
|
|
|
+ // Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
|
|
|
+
|
|
|
|
+ {.$Define ImDrawIdx_32}
|
|
|
|
+ {$IfDef ImDrawIdx_32}
|
|
|
|
+ ImDrawIdx = ImU32;
|
|
|
|
+ {$ELSE}
|
|
|
|
+ ImDrawIdx = ImU16; // Default: 16-bit (for maximum compatibility with renderer backends)
|
|
|
|
+ {$EndIf}
|
|
|
|
+
|
|
|
|
+
|
|
PImDrawDataBuilder = ^ImDrawDataBuilder;
|
|
PImDrawDataBuilder = ^ImDrawDataBuilder;
|
|
PImDrawData = ^ImDrawData;
|
|
PImDrawData = ^ImDrawData;
|
|
PImDrawCmdHeader = ^ImDrawCmdHeader;
|
|
PImDrawCmdHeader = ^ImDrawCmdHeader;
|
|
@@ -756,6 +770,8 @@ Type
|
|
Data: PImGuiListClipperData;
|
|
Data: PImGuiListClipperData;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
+ { ImDrawCmd }
|
|
|
|
+
|
|
ImDrawCmd = Record
|
|
ImDrawCmd = Record
|
|
ClipRect: ImVec4;
|
|
ClipRect: ImVec4;
|
|
TextureId: ImTextureID;
|
|
TextureId: ImTextureID;
|
|
@@ -764,6 +780,7 @@ Type
|
|
ElemCount: Cardinal;
|
|
ElemCount: Cardinal;
|
|
UserCallback: ImDrawCallback;
|
|
UserCallback: ImDrawCallback;
|
|
UserCallbackData: Pointer;
|
|
UserCallbackData: Pointer;
|
|
|
|
+ function GetTexID() : ImTextureID;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
|
|
@@ -785,6 +802,7 @@ Type
|
|
Data: PImDrawCmd;
|
|
Data: PImDrawCmd;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
+
|
|
ImVector_ImDrawIdx = Record
|
|
ImVector_ImDrawIdx = Record
|
|
Size: Integer;
|
|
Size: Integer;
|
|
Capacity: Integer;
|
|
Capacity: Integer;
|
|
@@ -1573,11 +1591,13 @@ Type
|
|
ImVector_ImDrawList = Record
|
|
ImVector_ImDrawList = Record
|
|
Size: Integer;
|
|
Size: Integer;
|
|
Capacity: Integer;
|
|
Capacity: Integer;
|
|
- Data: PImDrawList;
|
|
|
|
|
|
+ Data: PPImDrawList;
|
|
End;
|
|
End;
|
|
- ImVector_ImDrawListPtr = ^ImVector_ImDrawList;
|
|
|
|
|
|
+ ImVector_ImDrawListPtr = ImVector_ImDrawList;
|
|
PImVector_ImDrawListPtr = ^ImVector_ImDrawListPtr;
|
|
PImVector_ImDrawListPtr = ^ImVector_ImDrawListPtr;
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
ImDrawData = Record
|
|
ImDrawData = Record
|
|
Valid: Boolean;
|
|
Valid: Boolean;
|
|
CmdListsCount: Integer;
|
|
CmdListsCount: Integer;
|
|
@@ -1590,6 +1610,7 @@ Type
|
|
OwnerViewport: PImGuiViewport;
|
|
OwnerViewport: PImGuiViewport;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
+
|
|
ImGuiPlatformIO = Record
|
|
ImGuiPlatformIO = Record
|
|
Platform_CreateWindow : procedure(viewport : PImGuiViewport); Cdecl;
|
|
Platform_CreateWindow : procedure(viewport : PImGuiViewport); Cdecl;
|
|
Platform_DestroyWindow : procedure(viewport : PImGuiViewport); Cdecl;
|
|
Platform_DestroyWindow : procedure(viewport : PImGuiViewport); Cdecl;
|
|
@@ -2472,6 +2493,14 @@ Type
|
|
U0, V0, U1, V1: Single;
|
|
U0, V0, U1, V1: Single;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
+// Special Draw callback value to request renderer backend to reset the graphics/render state.
|
|
|
|
+// The renderer backend needs to handle this special value, otherwise it will crash trying to call a function at this address.
|
|
|
|
+// This is useful, for example, if you submitted callbacks which you know have altered the render state and you want it to be restored.
|
|
|
|
+// Render state is not reset by default because they are many perfectly useful way of altering render state (e.g. changing shader/blending settings before an Image call).
|
|
|
|
+
|
|
|
|
+const
|
|
|
|
+ ImDrawCallback_ResetRenderState : ImDrawCallback = Pointer(-8);
|
|
|
|
+
|
|
Implementation
|
|
Implementation
|
|
|
|
|
|
{ ImVec2 }
|
|
{ ImVec2 }
|
|
@@ -2511,6 +2540,13 @@ begin
|
|
Self.w := _w;
|
|
Self.w := _w;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{ ImDrawCmd }
|
|
|
|
+
|
|
|
|
+function ImDrawCmd.GetTexID(): ImTextureID;
|
|
|
|
+begin
|
|
|
|
+ Result := TextureId;
|
|
|
|
+end;
|
|
|
|
+
|
|
{ ImGuiDockRequest }
|
|
{ ImGuiDockRequest }
|
|
|
|
|
|
constructor ImGuiDockRequest.New(_DockSplitRatio : Single);
|
|
constructor ImGuiDockRequest.New(_DockSplitRatio : Single);
|