Skip to content

Commit 34095a3

Browse files
committed
Bug fix for #83.
1 parent d321786 commit 34095a3

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

Examples/ExampleGLFWD3D11/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ unsafe void Resized(Hexa.NET.GLFW.GLFWwindow* window, int width, int height)
109109
}
110110

111111
ImGuiImplD3D11.Shutdown();
112+
ImGuiImplD3D11.SetCurrentContext(null);
112113
ImGuiImplGLFW.Shutdown();
114+
ImGuiImplGLFW.SetCurrentContext(null);
113115
ImGui.DestroyContext();
114116
builder.Dispose();
115117
manager.Dispose();

Examples/ExampleGLFWOpenGL3/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
}
8080

8181
GL GL = new(new BindingsContext(window));
82-
8382
// Main loop
8483
while (GLFW.WindowShouldClose(window) == 0)
8584
{
@@ -100,8 +99,6 @@
10099
ImGuiImplGLFW.NewFrame();
101100
ImGui.NewFrame();
102101

103-
ImGui.ShowDemoWindow();
104-
105102
ImGui.Render();
106103

107104
GLFW.MakeContextCurrent(window);
@@ -120,7 +117,9 @@
120117
}
121118

122119
ImGuiImplOpenGL3.Shutdown();
120+
ImGuiImplOpenGL3.SetCurrentContext(null);
123121
ImGuiImplGLFW.Shutdown();
122+
ImGuiImplGLFW.SetCurrentContext(null);
124123
ImGui.DestroyContext();
125124
GL.Dispose();
126125

Generator/config.base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
}
5454
],
5555
"TypeMappings": {
56+
"ImBitArray_ImGuiKey_NamedKey_COUNT__lessImGuiKey_NamedKey_BEGIN": "ImBitArrayForNamedKeys",
57+
"ImBitArrayForNamedKeys": "ImBitArrayForNamedKeys",
5658
"ImVector_ImDrawCmd": "ImVector<ImDrawCmd>",
5759
"ImVec2": "Vector2",
5860
"ImVec3": "Vector3",
@@ -76,7 +78,6 @@
7678
"ImGuiTableDrawChannelIdx": "byte",
7779
"ImGuiTableColumnIdx": "sbyte",
7880
"ImGuiSelectionUserData": "long",
79-
"ImBitArrayForNamedKeys": "nuint",
8081
"ImStbTexteditState": "STBTexteditState",
8182
"stbrp_node_im": "StbrpNode",
8283
"va_list": "nuint"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Hexa.NET.ImGui
2020
/// To be documented.
2121
/// </summary>
2222
[StructLayout(LayoutKind.Sequential)]
23-
public partial struct ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN
23+
public partial struct ImBitArrayForNamedKeys
2424
{
2525
/// <summary>
2626
/// To be documented.
@@ -35,7 +35,7 @@ public partial struct ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN
3535
/// <summary>
3636
/// To be documented.
3737
/// </summary>
38-
public unsafe ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN(uint* storage = default)
38+
public unsafe ImBitArrayForNamedKeys(uint* storage = default)
3939
{
4040
if (storage != default(uint*))
4141
{
@@ -50,7 +50,7 @@ public unsafe ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN(uint* sto
5050
/// <summary>
5151
/// To be documented.
5252
/// </summary>
53-
public unsafe ImBitArrayImGuiKeyNamedKeyCOUNTLessImGuiKeyNamedKeyBEGIN(Span<uint> storage = default)
53+
public unsafe ImBitArrayForNamedKeys(Span<uint> storage = default)
5454
{
5555
if (storage != default(Span<uint>))
5656
{

Hexa.NET.ImGui/Generated/Structs/ImGuiContext.cs

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

Hexa.NET.ImGui/Hexa.NET.ImGui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<IsAotCompatible>true</IsAotCompatible>
1414

1515
<AssemblyVersion>1.92.1</AssemblyVersion>
16-
<PackageVersion>2.2.8.4</PackageVersion>
16+
<PackageVersion>2.2.8.5</PackageVersion>
1717
<Description>A .NET wrapper for the Dear ImGui library. (1.92.1)</Description>
1818
<PackageTags>ImGui UI Immidate GUI Hexa HexaGen Source Generator C# .NET DotNet Sharp Windows macOS Android Bindings Wrapper Native</PackageTags>
1919
<Authors>Juna Meinhold</Authors>

0 commit comments

Comments
 (0)