Previously only the length of the label was allocated. As .net is
initializing arrays with 0 and (at least for this stackalloc here)
this happens in 4-byte chunks only strings with a length multiple of 4
were affected as in this case the allocated size exactly matched the
length of the string and so no 0 was left to be used for string end.
Now the array is generated always one byte larger than the label length,
so there will always be a 0 at the end.
NOTE: Not all native functions permit a null string to be passed, and may still fail. This change just fixes the null-ref that occurred wheen attempting to marshal the null string to UTF8.
Bumps beta identifier to beta3.
On .NET Core Unix platforms, there appears to be a codegen issue with
Bool8 which causes it to mangle values after the accessed range.
Conceptually, bool is the correc type to use in these places anyways,
and because the marshaller is not involved here, there are no problems
related to the marshaller's native-managed size mismatch.
This change overhauls ImGui.NET to be almost entirely auto-generated.
It parses data files from cimgui, which contain pre-processed
information about Dear ImGui's structures, enums, and functions. The
code generator spits out identical C# types and functions, and also
generates a safe, friendly wrapper layer.
--- This is a combination of 22 commits. ---
Initial attempt at auto-generating the native bindings.
More WIP generator stuff.
Mostly-working bindings with some TODO's left.
More WIP stuff for safe wrappers and bindings.
WIP
Update cimgui definitions and even better safe wrappers.
Fix "nonUDT" overloads and add a "RangeAccessor" struct.
Remove constructor methods from wrapper types.
More WIP
Grab latest structs_and_enums.json file
Attempted improvements
Very good state, everything working.
Correct cimgui.dll (win-x64)
Rework how ref/out parameters are marshalled.
Remove problematic string begin/end parameter pairs.
Update native deps to 1.0.65, update ImGui.NET.csproj.
Fix sample program compilation.
Fix up XNA sample program with new binding changes.
Add several more manual ImGui overloads to ease the upgrade.
Add [Flags] to flags enums.
Change version to 1.65.0.
Capitalize "Dear ImGui".
* Workspace
* Assembly name "ImGui.NET.FNA"
* Removed directives
* FNA ImGuiRenderer cleanup
* Comments
* More comments
* Even more comments
* Removed unnecessary changes to IO.cs
* Worked in review comments
* Cleanup and readme
* Corrected minVertexIndex and numVertices
* Removed png, now generating sample image on runtime
* SampleProgram.FNA - Added cimgui.dll as content
* Added MonoGame support
* Updated readme
* Suppress warning on the DrawIndexedPrimitives method
* Previously, there would always be a "close window" button in the corner, because internally ImGui.cs was passing a non-null pointer to the underlying function. Now, it only does so if you call an overload with the "ref bool" parameter.