brutal/Brutal.ImGui/Generated/Structs/ImDrawCmd.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

457 lines
23 KiB
C#

// <auto-generated/>
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
/// <summary>
/// <para>
/// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a
/// callback)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L175">imgui.h:175</see>
/// <br/><c>struct ImDrawCmd</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Forward declarations: ImDrawList, ImFontAtlas layer
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 72)]
public partial struct ImDrawCmd
{
/// <summary>
/// <para>
/// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData-&gt;DisplayPos to get clipping
/// rectangle in "viewport" coordinates
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3237">imgui.h:3237</see>
/// <br/><c>ImVec4 ClipRect</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(0)]
public float4 ClipRect;
/// <summary>
/// <para>
/// 16 // Reference to a font/texture atlas (where backend called ImTextureData::SetTexID()) or to a
/// user-provided texture ID (via e.g. ImGui::Image() calls). Both will lead to a ImTextureID value.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3238">imgui.h:3238</see>
/// <br/><c>ImTextureRef TexRef</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(16)]
public ImTextureRef TexRef;
/// <summary>
/// <para>
/// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may
/// be &gt;0 to support meshes larger than 64K vertices with 16-bit indices.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3239">imgui.h:3239</see>
/// <br/><c>unsigned int VtxOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(32)]
public uint VtxOffset;
/// <summary>
/// <para>
/// 4 // Start offset in index buffer.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3240">imgui.h:3240</see>
/// <br/><c>unsigned int IdxOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(36)]
public uint IdxOffset;
/// <summary>
/// <para>
/// 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee
/// ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3241">imgui.h:3241</see>
/// <br/><c>unsigned int ElemCount</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(40)]
public uint ElemCount;
/// <summary>
/// <para>
/// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will
/// be set normally.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3242">imgui.h:3242</see>
/// <br/><c>ImDrawCallback UserCallback</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(48)]
public nint UserCallback;
/// <summary>
/// <para>
/// 4-8 // Callback user data (when UserCallback != NULL). If called AddCallback() with size == 0, this is
/// a copy of the AddCallback() argument. If called AddCallback() with size &gt; 0, this is pointing to a
/// buffer where data is stored.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3243">imgui.h:3243</see>
/// <br/><c>void* UserCallbackData</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(56)]
public nint UserCallbackData;
/// <summary>
/// <para>
/// 4 // Size of callback user data when using storage, otherwise 0.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3244">imgui.h:3244</see>
/// <br/><c>int UserCallbackDataSize</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(64)]
public int UserCallbackDataSize;
/// <summary>
/// <para>
/// 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3245">imgui.h:3245</see>
/// <br/><c>int UserCallbackDataOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
[FieldOffset(68)]
public int UserCallbackDataOffset;
}
/// <summary>
/// <para>
/// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a
/// callback)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L175">imgui.h:175</see>
/// <br/><c>struct ImDrawCmd</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Forward declarations: ImDrawList, ImFontAtlas layer
/// </para>
/// </remarks>
public unsafe partial struct ImDrawCmdPtr(ImDrawCmd* ptr) : INullable
{
private ImDrawCmd* _ptr = ptr;
public ImDrawCmd* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImDrawCmdPtr(ImDrawCmd* ptr) => new(ptr);
public static implicit operator ImDrawCmd*(ImDrawCmdPtr wrapper) => wrapper.Ptr;
/// <summary>
/// <para>
/// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData-&gt;DisplayPos to get clipping
/// rectangle in "viewport" coordinates
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3237">imgui.h:3237</see>
/// <br/><c>ImVec4 ClipRect</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref float4 ClipRect => ref Unsafe.AsRef<float4>(&_ptr->ClipRect);
/// <summary>
/// <para>
/// 16 // Reference to a font/texture atlas (where backend called ImTextureData::SetTexID()) or to a
/// user-provided texture ID (via e.g. ImGui::Image() calls). Both will lead to a ImTextureID value.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3238">imgui.h:3238</see>
/// <br/><c>ImTextureRef TexRef</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref ImTextureRef TexRef => ref Unsafe.AsRef<ImTextureRef>(&_ptr->TexRef);
/// <summary>
/// <para>
/// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may
/// be &gt;0 to support meshes larger than 64K vertices with 16-bit indices.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3239">imgui.h:3239</see>
/// <br/><c>unsigned int VtxOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&_ptr->VtxOffset);
/// <summary>
/// <para>
/// 4 // Start offset in index buffer.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3240">imgui.h:3240</see>
/// <br/><c>unsigned int IdxOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&_ptr->IdxOffset);
/// <summary>
/// <para>
/// 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee
/// ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3241">imgui.h:3241</see>
/// <br/><c>unsigned int ElemCount</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&_ptr->ElemCount);
/// <summary>
/// <para>
/// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will
/// be set normally.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3242">imgui.h:3242</see>
/// <br/><c>ImDrawCallback UserCallback</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref nint UserCallback => ref Unsafe.AsRef<nint>(&_ptr->UserCallback);
/// <summary>
/// <para>
/// 4-8 // Callback user data (when UserCallback != NULL). If called AddCallback() with size == 0, this is
/// a copy of the AddCallback() argument. If called AddCallback() with size &gt; 0, this is pointing to a
/// buffer where data is stored.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3243">imgui.h:3243</see>
/// <br/><c>void* UserCallbackData</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref nint UserCallbackData => ref Unsafe.AsRef<nint>(&_ptr->UserCallbackData);
/// <summary>
/// <para>
/// 4 // Size of callback user data when using storage, otherwise 0.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3244">imgui.h:3244</see>
/// <br/><c>int UserCallbackDataSize</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref int UserCallbackDataSize => ref Unsafe.AsRef<int>(&_ptr->UserCallbackDataSize);
/// <summary>
/// <para>
/// 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3245">imgui.h:3245</see>
/// <br/><c>int UserCallbackDataOffset</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.
/// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
/// </code>
/// </remarks>
public ref int UserCallbackDataOffset => ref Unsafe.AsRef<int>(&_ptr->UserCallbackDataOffset);
}
}