power_play/src/ui/ui_draw.h
2025-10-23 23:54:47 -05:00

52 lines
1.6 KiB
C

////////////////////////////////////////////////////////////
//~ Rect types
Struct(UI_RectSig)
{
/* ----------------------------------------------------- */
Vec2I32 viewport_size; /* 02 consts */
StructuredBufferRid rects; /* 01 consts */
SamplerStateRid sampler; /* 01 consts */
/* ----------------------------------------------------- */
};
AssertRootConst(UI_RectSig, 4);
Enum(UI_RectFlag)
{
UI_RectFlag_None = 0,
UI_RectFlag_DrawTexture = (1 << 0),
};
Struct(UI_RectInstance)
{
UI_RectFlag flags;
Vec2 p0;
Vec2 p1;
u32 tint_srgb;
u32 background_srgb;
u32 border_srgb;
f32 border;
Vec2 tex_uv0;
Vec2 tex_uv1;
Texture2DRid tex;
f32 rounding;
};
////////////////////////////////////////////////////////////
//~ Post types
Struct(UI_PostSig)
{
/* ----------------------------------------------------- */
Vec2I32 tex_size; /* 02 consts */
RWTexture2DRid tex; /* 01 consts */
f32 gamma; /* 01 consts */
/* ----------------------------------------------------- */
SamplerStateRid sampler; /* 01 consts */
u32 _pad0; /* 01 consts (padding) */
u32 _pad1; /* 01 consts (padding) */
u32 _pad2; /* 01 consts (padding) */
/* ----------------------------------------------------- */
};
AssertRootConst(UI_PostSig, 8);