9#include "ecs/component/ui/ui_element.h"
10#include "resource/asset/font_asset.h"
11#include "resource/asset/texture_asset.h"
13namespace Vkm::Engine {
33constexpr float UI_TEXT_MARK = -1.0f;
41 uint32_t firstVertex = 0;
42 uint32_t vertexCount = 0;
50 TextureHandle image = {};
59 std::vector<UIVertex> vertices;
60 std::vector<UIDrawCmd> commands;
Names one entity of one Scene, for as long as that slot holds it.
Definition entity.h:23
A contiguous run of UI vertices that share draw state.
Definition ui_draw_data.h:40
UIRect clip
Screen-pixel scissor rect, viewport-relative; the whole viewport when unclipped.
Definition ui_draw_data.h:47
The backend-agnostic UI overlay for one frame, published on FrameContext::ui.
Definition ui_draw_data.h:58
EntityId pointerTarget
The topmost element under the pointer that blocks it, or none.
Definition ui_draw_data.h:67
An axis-aligned screen-space rectangle (top-left origin, pixels).
Definition ui_element.h:12
One vertex of the UI's 2D triangle stream.
Definition ui_draw_data.h:22
glm::vec2 uv
Atlas coordinates for text; the quad's own 0..1 for a solid.
Definition ui_draw_data.h:24
glm::vec4 shape
Quad width and height (screen px), corner radius (UI_TEXT_MARK on a glyph), border width.
Definition ui_draw_data.h:27
float image
Solid only: 1 when tinted by its run's image, 0 when flat.
Definition ui_draw_data.h:29
glm::vec4 border
Solid only: the border's colour.
Definition ui_draw_data.h:28