29#include <glm/gtc/packing.hpp>
48 void SetColor( uint8_t aR, uint8_t aG, uint8_t aB, uint8_t aA = 255 )
50 r = aR;
g = aG;
b = aB;
a = aA;
52 void SetUV(
float aU,
float aV ) {
u = glm::packHalf1x16( aU );
v = glm::packHalf1x16( aV ); }
55static_assert(
sizeof(
RHI_VERTEX ) == 16,
"RHI_VERTEX must be exactly 16 bytes" );
56static_assert(
alignof(
RHI_VERTEX ) <= 4,
"RHI_VERTEX must not require more than 4-byte alignment" );
RHI_VERTEX_BUFFER_LAYOUT_DESC RhiStandardVertexLayout()
Shaders read position at location 0, color at 1 and texture coordinates at 2.
RHI_VERTEX_STEP_MODE stepMode
std::vector< RHI_VERTEX_ATTRIBUTE_DESC > attributes
Position is in world coordinates, color is premultiplied alpha and u, v hold half floats.
void SetPosition(float aX, float aY)
void SetColor(uint8_t aR, uint8_t aG, uint8_t aB, uint8_t aA=255)
void SetUV(float aU, float aV)