vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::UIVertex Struct Reference

One vertex of the UI's 2D triangle stream. More...

#include <ui_draw_data.h>

Public Attributes

glm::vec2 uv
 Atlas coordinates for text; the quad's own 0..1 for a solid.
glm::vec4 shape
 Quad width and height (screen px), corner radius (UI_TEXT_MARK on a glyph), border width.
glm::vec4 border
 Solid only: the border's colour.
float image
 Solid only: 1 when tinted by its run's image, 0 when flat.

Detailed Description

One vertex of the UI's 2D triangle stream.

pos is screen pixels, top-left origin; color is straight RGBA. A solid carries its quad's shape on every vertex for the fragment stage. Glyphs (UI_TEXT_MARK) and the image flag are per-vertex, so solids, text and pictures share a draw call.


The documentation for this struct was generated from the following file: