PSYQo
Public Attributes | List of all members
psyqo::Vertex Union Reference

The Vertex struct. More...

#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
 

Detailed Description

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}};


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