Skip to content

Commit

Permalink
Merge pull request #427 from ImGuiNET/f/upgrade-18990
Browse files Browse the repository at this point in the history
Ugrade to imgui.net 1.89.9
  • Loading branch information
zaafar committed Sep 18, 2023
2 parents 0ea06bb + ab30115 commit a51c982
Show file tree
Hide file tree
Showing 18 changed files with 2,008 additions and 1,659 deletions.
Binary file modified deps/cimgui/linux-x64/cimgui.so
Binary file not shown.
Binary file modified deps/cimgui/osx/cimgui.dylib
Binary file not shown.
Binary file modified deps/cimgui/win-arm64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x86/cimgui.dll
Binary file not shown.
2,974 changes: 1,548 additions & 1,426 deletions src/CodeGenerator/definitions/cimgui/definitions.json

Large diffs are not rendered by default.

632 changes: 424 additions & 208 deletions src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private unsafe void UpdateBuffers(ImDrawDataPtr drawData)

for (int n = 0; n < drawData.CmdListsCount; n++)
{
ImDrawListPtr cmdList = drawData.CmdListsRange[n];
ImDrawListPtr cmdList = drawData.CmdLists[n];

fixed (void* vtxDstPtr = &_vertexData[vtxOffset * DrawVertDeclaration.Size])
fixed (void* idxDstPtr = &_indexData[idxOffset * sizeof(ushort)])
Expand Down Expand Up @@ -374,7 +374,7 @@ private unsafe void RenderCommandLists(ImDrawDataPtr drawData)

for (int n = 0; n < drawData.CmdListsCount; n++)
{
ImDrawListPtr cmdList = drawData.CmdListsRange[n];
ImDrawListPtr cmdList = drawData.CmdLists[n];

for (int cmdi = 0; cmdi < cmdList.CmdBuffer.Size; cmdi++)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ImGui.NET.SampleProgram/ImGuiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ private void RenderImDrawData(ImDrawDataPtr draw_data, GraphicsDevice gd, Comman

for (int i = 0; i < draw_data.CmdListsCount; i++)
{
ImDrawListPtr cmd_list = draw_data.CmdListsRange[i];
ImDrawListPtr cmd_list = draw_data.CmdLists[i];

cl.UpdateBuffer(
_vertexBuffer,
Expand Down Expand Up @@ -481,7 +481,7 @@ private void RenderImDrawData(ImDrawDataPtr draw_data, GraphicsDevice gd, Comman
int idx_offset = 0;
for (int n = 0; n < draw_data.CmdListsCount; n++)
{
ImDrawListPtr cmd_list = draw_data.CmdListsRange[n];
ImDrawListPtr cmd_list = draw_data.CmdLists[n];
for (int cmd_i = 0; cmd_i < cmd_list.CmdBuffer.Size; cmd_i++)
{
ImDrawCmdPtr pcmd = cmd_list.CmdBuffer[cmd_i];
Expand Down
9 changes: 7 additions & 2 deletions src/ImGui.NET/Generated/ImDrawData.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public unsafe partial struct ImDrawData
public int CmdListsCount;
public int TotalIdxCount;
public int TotalVtxCount;
public ImDrawList** CmdLists;
public ImVector CmdLists;
public Vector2 DisplayPos;
public Vector2 DisplaySize;
public Vector2 FramebufferScale;
Expand All @@ -29,11 +29,16 @@ public unsafe partial struct ImDrawDataPtr
public ref int CmdListsCount => ref Unsafe.AsRef<int>(&NativePtr->CmdListsCount);
public ref int TotalIdxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalIdxCount);
public ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount);
public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; }
public ImVector<ImDrawListPtr> CmdLists => new ImVector<ImDrawListPtr>(NativePtr->CmdLists);
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
public ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->FramebufferScale);
public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport);
public void AddDrawList(ImDrawListPtr draw_list)
{
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImDrawData_AddDrawList((ImDrawData*)(NativePtr), native_draw_list);
}
public void Clear()
{
ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr));
Expand Down
12 changes: 6 additions & 6 deletions src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public enum ImGuiHoveredFlags
AllowWhenOverlapped = 768,
RectOnly = 928,
RootAndChildWindows = 3,
ForTooltip = 2048,
Stationary = 4096,
DelayNone = 8192,
DelayShort = 16384,
DelayNormal = 32768,
NoSharedDelay = 65536,
ForTooltip = 4096,
Stationary = 8192,
DelayNone = 16384,
DelayShort = 32768,
DelayNormal = 65536,
NoSharedDelay = 131072,
}
}
6 changes: 4 additions & 2 deletions src/ImGui.NET/Generated/ImGuiIO.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public unsafe partial struct ImGuiIO
public void* ClipboardUserData;
public IntPtr SetPlatformImeDataFn;
public void* _UnusedPadding;
public ushort PlatformLocaleDecimalPoint;
public byte WantCaptureMouse;
public byte WantCaptureKeyboard;
public byte WantTextInput;
Expand Down Expand Up @@ -826,6 +827,7 @@ public unsafe partial struct ImGuiIOPtr
public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; }
public ref IntPtr SetPlatformImeDataFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->SetPlatformImeDataFn);
public IntPtr _UnusedPadding { get => (IntPtr)NativePtr->_UnusedPadding; set => NativePtr->_UnusedPadding = (void*)value; }
public ref ushort PlatformLocaleDecimalPoint => ref Unsafe.AsRef<ushort>(&NativePtr->PlatformLocaleDecimalPoint);
public ref bool WantCaptureMouse => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureMouse);
public ref bool WantCaptureKeyboard => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureKeyboard);
public ref bool WantTextInput => ref Unsafe.AsRef<bool>(&NativePtr->WantTextInput);
Expand Down Expand Up @@ -953,9 +955,9 @@ public void AddMouseWheelEvent(float wheel_x, float wheel_y)
{
ImGuiNative.ImGuiIO_AddMouseWheelEvent((ImGuiIO*)(NativePtr), wheel_x, wheel_y);
}
public void ClearInputCharacters()
public void ClearEventsQueue()
{
ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr));
ImGuiNative.ImGuiIO_ClearEventsQueue((ImGuiIO*)(NativePtr));
}
public void ClearInputKeys()
{
Expand Down
4 changes: 4 additions & 0 deletions src/ImGui.NET/Generated/ImGuiListClipper.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public void End()
{
ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr));
}
public void IncludeItemByIndex(int item_index)
{
ImGuiNative.ImGuiListClipper_IncludeItemByIndex((ImGuiListClipper*)(NativePtr), item_index);
}
public bool Step()
{
byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr));
Expand Down
8 changes: 6 additions & 2 deletions src/ImGui.NET/Generated/ImGuiNative.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,8 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_AddDrawList(ImDrawData* self, ImDrawList* draw_list);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_Clear(ImDrawData* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self);
Expand Down Expand Up @@ -1109,7 +1111,7 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_AddMouseWheelEvent(ImGuiIO* self, float wheel_x, float wheel_y);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
public static extern void ImGuiIO_ClearEventsQueue(ImGuiIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_ClearInputKeys(ImGuiIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand All @@ -1129,7 +1131,9 @@ public static unsafe partial class ImGuiNative
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_IncludeRangeByIndices(ImGuiListClipper* self, int item_begin, int item_end);
public static extern void ImGuiListClipper_IncludeItemByIndex(ImGuiListClipper* self, int item_index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiListClipper_IncludeItemsByIndex(ImGuiListClipper* self, int item_begin, int item_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImGuiStyle.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public unsafe partial struct ImGuiStyle
public Vector2 SeparatorTextPadding;
public Vector2 DisplayWindowPadding;
public Vector2 DisplaySafeAreaPadding;
public float DockingSeparatorSize;
public float MouseCursorScale;
public byte AntiAliasedLines;
public byte AntiAliasedLinesUseTex;
Expand Down Expand Up @@ -156,6 +157,7 @@ public unsafe partial struct ImGuiStylePtr
public ref Vector2 SeparatorTextPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->SeparatorTextPadding);
public ref Vector2 DisplayWindowPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayWindowPadding);
public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySafeAreaPadding);
public ref float DockingSeparatorSize => ref Unsafe.AsRef<float>(&NativePtr->DockingSeparatorSize);
public ref float MouseCursorScale => ref Unsafe.AsRef<float>(&NativePtr->MouseCursorScale);
public ref bool AntiAliasedLines => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLines);
public ref bool AntiAliasedLinesUseTex => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLinesUseTex);
Expand Down
3 changes: 2 additions & 1 deletion src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum ImGuiStyleVar
SeparatorTextBorderSize = 25,
SeparatorTextAlign = 26,
SeparatorTextPadding = 27,
COUNT = 28,
DockingSeparatorSize = 28,
COUNT = 29,
}
}
7 changes: 0 additions & 7 deletions src/ImGui.NET/ImDrawData.Manual.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/ImGui.NET/ImGui.NET.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.89.7.1</AssemblyVersion>
<AssemblyVersion>1.89.9.1</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down

0 comments on commit a51c982

Please sign in to comment.