//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
///
///
/// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a
/// callback)
///
///
/// C++:
/// imgui.h:175
///
struct ImDrawCmd
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
[StructLayout(LayoutKind.Explicit, Size = 72)]
public partial struct ImDrawCmd
{
///
///
/// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping
/// rectangle in "viewport" coordinates
///
///
/// C++:
/// imgui.h:3237
///
ImVec4 ClipRect
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(0)]
public float4 ClipRect;
///
///
/// 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.
///
///
/// C++:
/// imgui.h:3238
///
ImTextureRef TexRef
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(16)]
public ImTextureRef TexRef;
///
///
/// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may
/// be >0 to support meshes larger than 64K vertices with 16-bit indices.
///
///
/// C++:
/// imgui.h:3239
///
unsigned int VtxOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(32)]
public uint VtxOffset;
///
///
/// 4 // Start offset in index buffer.
///
///
/// C++:
/// imgui.h:3240
///
unsigned int IdxOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(36)]
public uint IdxOffset;
///
///
/// 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[].
///
///
/// C++:
/// imgui.h:3241
///
unsigned int ElemCount
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(40)]
public uint ElemCount;
///
///
/// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will
/// be set normally.
///
///
/// C++:
/// imgui.h:3242
///
ImDrawCallback UserCallback
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(48)]
public nint UserCallback;
///
///
/// 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 > 0, this is pointing to a
/// buffer where data is stored.
///
///
/// C++:
/// imgui.h:3243
///
void* UserCallbackData
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(56)]
public nint UserCallbackData;
///
///
/// 4 // Size of callback user data when using storage, otherwise 0.
///
///
/// C++:
/// imgui.h:3244
///
int UserCallbackDataSize
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(64)]
public int UserCallbackDataSize;
///
///
/// 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
///
///
/// C++:
/// imgui.h:3245
///
int UserCallbackDataOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
[FieldOffset(68)]
public int UserCallbackDataOffset;
}
///
///
/// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a
/// callback)
///
///
/// C++:
/// imgui.h:175
///
struct ImDrawCmd
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
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;
///
///
/// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping
/// rectangle in "viewport" coordinates
///
///
/// C++:
/// imgui.h:3237
///
ImVec4 ClipRect
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref float4 ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect);
///
///
/// 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.
///
///
/// C++:
/// imgui.h:3238
///
ImTextureRef TexRef
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref ImTextureRef TexRef => ref Unsafe.AsRef(&_ptr->TexRef);
///
///
/// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may
/// be >0 to support meshes larger than 64K vertices with 16-bit indices.
///
///
/// C++:
/// imgui.h:3239
///
unsigned int VtxOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref uint VtxOffset => ref Unsafe.AsRef(&_ptr->VtxOffset);
///
///
/// 4 // Start offset in index buffer.
///
///
/// C++:
/// imgui.h:3240
///
unsigned int IdxOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref uint IdxOffset => ref Unsafe.AsRef(&_ptr->IdxOffset);
///
///
/// 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[].
///
///
/// C++:
/// imgui.h:3241
///
unsigned int ElemCount
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref uint ElemCount => ref Unsafe.AsRef(&_ptr->ElemCount);
///
///
/// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will
/// be set normally.
///
///
/// C++:
/// imgui.h:3242
///
ImDrawCallback UserCallback
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref nint UserCallback => ref Unsafe.AsRef(&_ptr->UserCallback);
///
///
/// 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 > 0, this is pointing to a
/// buffer where data is stored.
///
///
/// C++:
/// imgui.h:3243
///
void* UserCallbackData
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref nint UserCallbackData => ref Unsafe.AsRef(&_ptr->UserCallbackData);
///
///
/// 4 // Size of callback user data when using storage, otherwise 0.
///
///
/// C++:
/// imgui.h:3244
///
int UserCallbackDataSize
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref int UserCallbackDataSize => ref Unsafe.AsRef(&_ptr->UserCallbackDataSize);
///
///
/// 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
///
///
/// C++:
/// imgui.h:3245
///
int UserCallbackDataOffset
///
///
///
///
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)
/// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
/// Backends made for <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).
///
///
public ref int UserCallbackDataOffset => ref Unsafe.AsRef(&_ptr->UserCallbackDataOffset);
}
}