Exemple #1
0
        private unsafe void Resize(int newSize)
        {
            IntPtr newBuffer = ImGui.IO.MemAlloc(newSize);

            ImGuiNativeHelper.CopyData((void *)Buffer, (void *)newBuffer, Length);
            ImGui.IO.MemFree(Buffer);
            if (newSize > Length)
            {
                ImGuiNativeHelper.ClearData((void *)((byte *)Buffer + Length), (uint)newSize - Length);
            }
            Buffer  = newBuffer;
            _Length = (uint)newSize;
        }
Exemple #2
0
 public unsafe void ClearData()
 {
     ImGuiNativeHelper.ClearData((void *)Buffer, Length);
 }