Skip to content

Commit

Permalink
Merge pull request #2 from mattmanj17/matthewd
Browse files Browse the repository at this point in the history
Update to fix Unsafe error
  • Loading branch information
vlandemart authored Dec 12, 2022
2 parents ce928e0 + 101996d commit 53466f3
Show file tree
Hide file tree
Showing 34 changed files with 252 additions and 249 deletions.
7 changes: 4 additions & 3 deletions ImGuiNET/ColorExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -8,19 +9,19 @@ public static class ColorExtensions
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe Color32 ToColor32(this uint rgba)
{
return Unsafe.AsRef<Color32>(&rgba);
return UnsafeUtility.AsRef<Color32>(&rgba);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe Color ToColor(this uint rgba)
{
return Unsafe.AsRef<Color32>(&rgba); // implicit conversion to Color
return UnsafeUtility.AsRef<Color32>(&rgba); // implicit conversion to Color
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe uint ToUint(this Color32 c32)
{
return Unsafe.AsRef<uint>(&c32);
return UnsafeUtility.AsRef<uint>(&c32);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper.Extra/ImFontConfigPtr.Extra.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Runtime.CompilerServices;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
public unsafe partial struct ImFontConfigPtr
{
public ImFontConfigPtr(ref ImFontConfig fontConfig)
{
NativePtr = (ImFontConfig*)Unsafe.AsPointer(ref fontConfig);
NativePtr = (ImFontConfig*)UnsafeUtility.AddressOf(ref fontConfig);
}
}
}
10 changes: 5 additions & 5 deletions ImGuiNET/Wrapper.Extra/ImGui.Extra.DragDrop.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
using System;
using System.Text;
using System.Runtime.CompilerServices;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
// ImGui extra functionality related with Drag and Drop
public static partial class ImGui
{
// TODO: review
// can now pass refs with Unsafe.AsRef
// can now pass refs with UnsafeUtility.AsRef

public static unsafe void SetDragDropPayload<T>(string type, T data, ImGuiCond cond = 0)
where T : unmanaged
{
void* ptr = Unsafe.AsPointer(ref data);
SetDragDropPayload(type, new IntPtr(ptr), (uint)Unsafe.SizeOf<T>(), cond);
void* ptr = UnsafeUtility.AddressOf(ref data);
SetDragDropPayload(type, new IntPtr(ptr), (uint)UnsafeUtility.SizeOf<T>(), cond);
}

public static unsafe bool AcceptDragDropPayload<T>(string type, out T payload, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None)
where T : unmanaged
{
ImGuiPayload* pload = AcceptDragDropPayload(type, flags);
payload = (pload != null) ? Unsafe.Read<T>(pload->Data) : default;
payload = (pload != null) ? UnsafeUtility.ReadArrayElement<T>(pload->Data, 0) : default;
return pload != null;
}

Expand Down
6 changes: 3 additions & 3 deletions ImGuiNET/Wrapper.Extra/ImGui.Extra.InputTextWithHint.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand Down Expand Up @@ -91,8 +91,8 @@ public static bool InputTextWithHint(
}
Util.GetUtf8(input, utf8InputBytes, inputBufSize);
uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount);
Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount);
Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize);
UnsafeUtility.MemSet(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount);
UnsafeUtility.MemCpy(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize);

byte result = ImGuiNative.igInputTextWithHint(
utf8LabelBytes,
Expand Down
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper.Extra/ImGuiInputTextCallbackDataPtr.Extra.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Runtime.CompilerServices;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
public unsafe partial struct ImGuiInputTextCallbackDataPtr
{
public ImGuiInputTextCallbackDataPtr(ref ImGuiInputTextCallbackData data)
{
NativePtr = (ImGuiInputTextCallbackData*)Unsafe.AsPointer(ref data);
NativePtr = (ImGuiInputTextCallbackData*)UnsafeUtility.AddressOf(ref data);
}

public string Text => Util.StringFromPtr(NativePtr->Buf);
Expand Down
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper.Extra/ImGuiSizeCallbackDataPtr.Extra.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Runtime.CompilerServices;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
public unsafe partial struct ImGuiSizeCallbackDataPtr
{
public ImGuiSizeCallbackDataPtr(ref ImGuiSizeCallbackData data)
{
NativePtr = (ImGuiSizeCallbackData*)Unsafe.AsPointer(ref data);
NativePtr = (ImGuiSizeCallbackData*)UnsafeUtility.AddressOf(ref data);
}
}
}
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper.Extra/ImGuiTextFilterPtr.Extra.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -8,7 +8,7 @@ public unsafe partial struct ImGuiTextFilterPtr
{
public ImGuiTextFilterPtr(ref ImGuiTextFilter filter)
{
NativePtr = (ImGuiTextFilter*)Unsafe.AsPointer(ref filter);
NativePtr = (ImGuiTextFilter*)UnsafeUtility.AddressOf(ref filter);
}
}
}
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper/Generated/ImColor.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -17,7 +17,7 @@ public unsafe partial struct ImColorPtr
public static implicit operator ImColorPtr(ImColor* nativePtr) => new ImColorPtr(nativePtr);
public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr);
public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value);
public ref Vector4 Value => ref UnsafeUtility.AsRef<Vector4>(&NativePtr->Value);
public void Destroy()
{
ImGuiNative.ImColor_destroy(NativePtr);
Expand Down
4 changes: 2 additions & 2 deletions ImGuiNET/Wrapper/Generated/ImDrawChannel.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -18,7 +18,7 @@ public unsafe partial struct ImDrawChannelPtr
public static implicit operator ImDrawChannelPtr(ImDrawChannel* nativePtr) => new ImDrawChannelPtr(nativePtr);
public static implicit operator ImDrawChannel* (ImDrawChannelPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawChannelPtr(IntPtr nativePtr) => new ImDrawChannelPtr(nativePtr);
public ImPtrVector<ImDrawCmdPtr> _CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->_CmdBuffer, Unsafe.SizeOf<ImDrawCmd>());
public ImPtrVector<ImDrawCmdPtr> _CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->_CmdBuffer, UnsafeUtility.SizeOf<ImDrawCmd>());
public ImVector<ushort> _IdxBuffer => new ImVector<ushort>(NativePtr->_IdxBuffer);
}
}
14 changes: 7 additions & 7 deletions ImGuiNET/Wrapper/Generated/ImDrawCmd.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -23,12 +23,12 @@ public unsafe partial struct ImDrawCmdPtr
public static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) => new ImDrawCmdPtr(nativePtr);
public static implicit operator ImDrawCmd* (ImDrawCmdPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) => new ImDrawCmdPtr(nativePtr);
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount);
public ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>(&NativePtr->ClipRect);
public ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId);
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&NativePtr->VtxOffset);
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&NativePtr->IdxOffset);
public ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback);
public ref uint ElemCount => ref UnsafeUtility.AsRef<uint>(&NativePtr->ElemCount);
public ref Vector4 ClipRect => ref UnsafeUtility.AsRef<Vector4>(&NativePtr->ClipRect);
public ref IntPtr TextureId => ref UnsafeUtility.AsRef<IntPtr>(&NativePtr->TextureId);
public ref uint VtxOffset => ref UnsafeUtility.AsRef<uint>(&NativePtr->VtxOffset);
public ref uint IdxOffset => ref UnsafeUtility.AsRef<uint>(&NativePtr->IdxOffset);
public ref IntPtr UserCallback => ref UnsafeUtility.AsRef<IntPtr>(&NativePtr->UserCallback);
public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; }
public void Destroy()
{
Expand Down
16 changes: 8 additions & 8 deletions ImGuiNET/Wrapper/Generated/ImDrawData.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -24,14 +24,14 @@ public unsafe partial struct ImDrawDataPtr
public static implicit operator ImDrawDataPtr(ImDrawData* nativePtr) => new ImDrawDataPtr(nativePtr);
public static implicit operator ImDrawData* (ImDrawDataPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawDataPtr(IntPtr nativePtr) => new ImDrawDataPtr(nativePtr);
public ref bool Valid => ref Unsafe.AsRef<bool>(&NativePtr->Valid);
public ref bool Valid => ref UnsafeUtility.AsRef<bool>(&NativePtr->Valid);
public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; }
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 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 ref int CmdListsCount => ref UnsafeUtility.AsRef<int>(&NativePtr->CmdListsCount);
public ref int TotalIdxCount => ref UnsafeUtility.AsRef<int>(&NativePtr->TotalIdxCount);
public ref int TotalVtxCount => ref UnsafeUtility.AsRef<int>(&NativePtr->TotalVtxCount);
public ref Vector2 DisplayPos => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->DisplayPos);
public ref Vector2 DisplaySize => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->DisplaySize);
public ref Vector2 FramebufferScale => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->FramebufferScale);
public void Clear()
{
ImGuiNative.ImDrawData_Clear(NativePtr);
Expand Down
16 changes: 8 additions & 8 deletions ImGuiNET/Wrapper/Generated/ImDrawList.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand Down Expand Up @@ -30,20 +30,20 @@ public unsafe partial struct ImDrawListPtr
public static implicit operator ImDrawListPtr(ImDrawList* nativePtr) => new ImDrawListPtr(nativePtr);
public static implicit operator ImDrawList* (ImDrawListPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawListPtr(IntPtr nativePtr) => new ImDrawListPtr(nativePtr);
public ImPtrVector<ImDrawCmdPtr> CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->CmdBuffer, Unsafe.SizeOf<ImDrawCmd>());
public ImPtrVector<ImDrawCmdPtr> CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->CmdBuffer, UnsafeUtility.SizeOf<ImDrawCmd>());
public ImVector<ushort> IdxBuffer => new ImVector<ushort>(NativePtr->IdxBuffer);
public ImPtrVector<ImDrawVertPtr> VtxBuffer => new ImPtrVector<ImDrawVertPtr>(NativePtr->VtxBuffer, Unsafe.SizeOf<ImDrawVert>());
public ref ImDrawListFlags Flags => ref Unsafe.AsRef<ImDrawListFlags>(&NativePtr->Flags);
public ref IntPtr _Data => ref Unsafe.AsRef<IntPtr>(&NativePtr->_Data);
public ImPtrVector<ImDrawVertPtr> VtxBuffer => new ImPtrVector<ImDrawVertPtr>(NativePtr->VtxBuffer, UnsafeUtility.SizeOf<ImDrawVert>());
public ref ImDrawListFlags Flags => ref UnsafeUtility.AsRef<ImDrawListFlags>(&NativePtr->Flags);
public ref IntPtr _Data => ref UnsafeUtility.AsRef<IntPtr>(&NativePtr->_Data);
public NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName);
public ref uint _VtxCurrentOffset => ref Unsafe.AsRef<uint>(&NativePtr->_VtxCurrentOffset);
public ref uint _VtxCurrentIdx => ref Unsafe.AsRef<uint>(&NativePtr->_VtxCurrentIdx);
public ref uint _VtxCurrentOffset => ref UnsafeUtility.AsRef<uint>(&NativePtr->_VtxCurrentOffset);
public ref uint _VtxCurrentIdx => ref UnsafeUtility.AsRef<uint>(&NativePtr->_VtxCurrentIdx);
public ImDrawVertPtr _VtxWritePtr => new ImDrawVertPtr(NativePtr->_VtxWritePtr);
public IntPtr _IdxWritePtr { get => (IntPtr)NativePtr->_IdxWritePtr; set => NativePtr->_IdxWritePtr = (ushort*)value; }
public ImVector<Vector4> _ClipRectStack => new ImVector<Vector4>(NativePtr->_ClipRectStack);
public ImVector<IntPtr> _TextureIdStack => new ImVector<IntPtr>(NativePtr->_TextureIdStack);
public ImVector<Vector2> _Path => new ImVector<Vector2>(NativePtr->_Path);
public ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef<ImDrawListSplitter>(&NativePtr->_Splitter);
public ref ImDrawListSplitter _Splitter => ref UnsafeUtility.AsRef<ImDrawListSplitter>(&NativePtr->_Splitter);
public void AddBezierCurve(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
int num_segments = 0;
Expand Down
8 changes: 4 additions & 4 deletions ImGuiNET/Wrapper/Generated/ImDrawListSplitter.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -19,9 +19,9 @@ public unsafe partial struct ImDrawListSplitterPtr
public static implicit operator ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) => new ImDrawListSplitterPtr(nativePtr);
public static implicit operator ImDrawListSplitter* (ImDrawListSplitterPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawListSplitterPtr(IntPtr nativePtr) => new ImDrawListSplitterPtr(nativePtr);
public ref int _Current => ref Unsafe.AsRef<int>(&NativePtr->_Current);
public ref int _Count => ref Unsafe.AsRef<int>(&NativePtr->_Count);
public ImPtrVector<ImDrawChannelPtr> _Channels => new ImPtrVector<ImDrawChannelPtr>(NativePtr->_Channels, Unsafe.SizeOf<ImDrawChannel>());
public ref int _Current => ref UnsafeUtility.AsRef<int>(&NativePtr->_Current);
public ref int _Count => ref UnsafeUtility.AsRef<int>(&NativePtr->_Count);
public ImPtrVector<ImDrawChannelPtr> _Channels => new ImPtrVector<ImDrawChannelPtr>(NativePtr->_Channels, UnsafeUtility.SizeOf<ImDrawChannel>());
public void Clear()
{
ImGuiNative.ImDrawListSplitter_Clear(NativePtr);
Expand Down
8 changes: 4 additions & 4 deletions ImGuiNET/Wrapper/Generated/ImDrawVert.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand All @@ -19,8 +19,8 @@ public unsafe partial struct ImDrawVertPtr
public static implicit operator ImDrawVertPtr(ImDrawVert* nativePtr) => new ImDrawVertPtr(nativePtr);
public static implicit operator ImDrawVert* (ImDrawVertPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawVertPtr(IntPtr nativePtr) => new ImDrawVertPtr(nativePtr);
public ref Vector2 pos => ref Unsafe.AsRef<Vector2>(&NativePtr->pos);
public ref Vector2 uv => ref Unsafe.AsRef<Vector2>(&NativePtr->uv);
public ref uint col => ref Unsafe.AsRef<uint>(&NativePtr->col);
public ref Vector2 pos => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->pos);
public ref Vector2 uv => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->uv);
public ref uint col => ref UnsafeUtility.AsRef<uint>(&NativePtr->col);
}
}
26 changes: 13 additions & 13 deletions ImGuiNET/Wrapper/Generated/ImFont.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using Unity.Collections.LowLevel.Unsafe;

namespace ImGuiNET
{
Expand Down Expand Up @@ -34,22 +34,22 @@ public unsafe partial struct ImFontPtr
public static implicit operator ImFont* (ImFontPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImFontPtr(IntPtr nativePtr) => new ImFontPtr(nativePtr);
public ImVector<float> IndexAdvanceX => new ImVector<float>(NativePtr->IndexAdvanceX);
public ref float FallbackAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->FallbackAdvanceX);
public ref float FontSize => ref Unsafe.AsRef<float>(&NativePtr->FontSize);
public ref float FallbackAdvanceX => ref UnsafeUtility.AsRef<float>(&NativePtr->FallbackAdvanceX);
public ref float FontSize => ref UnsafeUtility.AsRef<float>(&NativePtr->FontSize);
public ImVector<ushort> IndexLookup => new ImVector<ushort>(NativePtr->IndexLookup);
public ImPtrVector<ImFontGlyphPtr> Glyphs => new ImPtrVector<ImFontGlyphPtr>(NativePtr->Glyphs, Unsafe.SizeOf<ImFontGlyph>());
public ImPtrVector<ImFontGlyphPtr> Glyphs => new ImPtrVector<ImFontGlyphPtr>(NativePtr->Glyphs, UnsafeUtility.SizeOf<ImFontGlyph>());
public ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph);
public ref Vector2 DisplayOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayOffset);
public ref Vector2 DisplayOffset => ref UnsafeUtility.AsRef<Vector2>(&NativePtr->DisplayOffset);
public ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas);
public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData);
public ref short ConfigDataCount => ref Unsafe.AsRef<short>(&NativePtr->ConfigDataCount);
public ref ushort FallbackChar => ref Unsafe.AsRef<ushort>(&NativePtr->FallbackChar);
public ref ushort EllipsisChar => ref Unsafe.AsRef<ushort>(&NativePtr->EllipsisChar);
public ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables);
public ref float Scale => ref Unsafe.AsRef<float>(&NativePtr->Scale);
public ref float Ascent => ref Unsafe.AsRef<float>(&NativePtr->Ascent);
public ref float Descent => ref Unsafe.AsRef<float>(&NativePtr->Descent);
public ref int MetricsTotalSurface => ref Unsafe.AsRef<int>(&NativePtr->MetricsTotalSurface);
public ref short ConfigDataCount => ref UnsafeUtility.AsRef<short>(&NativePtr->ConfigDataCount);
public ref ushort FallbackChar => ref UnsafeUtility.AsRef<ushort>(&NativePtr->FallbackChar);
public ref ushort EllipsisChar => ref UnsafeUtility.AsRef<ushort>(&NativePtr->EllipsisChar);
public ref bool DirtyLookupTables => ref UnsafeUtility.AsRef<bool>(&NativePtr->DirtyLookupTables);
public ref float Scale => ref UnsafeUtility.AsRef<float>(&NativePtr->Scale);
public ref float Ascent => ref UnsafeUtility.AsRef<float>(&NativePtr->Ascent);
public ref float Descent => ref UnsafeUtility.AsRef<float>(&NativePtr->Descent);
public ref int MetricsTotalSurface => ref UnsafeUtility.AsRef<int>(&NativePtr->MetricsTotalSurface);
public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
{
ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);
Expand Down
Loading

0 comments on commit 53466f3

Please sign in to comment.