PSYQo
|
#include <primitives.hh>
Public Attributes | |
struct { | |
union { | |
int16_t x | |
int16_t u | |
int16_t w | |
} | |
union { | |
int16_t y | |
int16_t v | |
int16_t h | |
} | |
}; | |
int32_t | packed |
The Vertex struct.
Represents a vertex in the VRAM space. Its binary representation is meant to be the same as the vertices that GPU commands await. It should fit in a single register, and the MIPS ABI ought to pass it as argument or return value gracefully, making it a nice general purpose utility.
Accessors can be either {x, y}, {u, v}, or {w, h}, for readability purposes.
Using C++ list-initializations, one can create a vertex directly using such syntax:
Vertex{{.x = 18, .y = 42}};