VVISF & VVGL
VVGL::Quad< QuadType > Struct Template Reference

This struct defines a quad- it's a simple template which is expected to be passed one of the structs derived from Vertex as the template type (this template type defines what kind of data the quad will contain). The instance methods make populating the quad with geometry/texture/color data easy, and the stride and offset methods simplify uploading the struct's memory directly to GL. More...

#include <VVGL_Geom.hpp>

Public Member Functions

int stride () const
 Returns the size of a single vertex in bytes/the stride between vertices. If you know the stride of a vertex you can upload vertex data directly to GL.
 
int geoOffset () const
 Returns the offset of the geometry data within the quad.
 
int texOffset () const
 Returns the offset of the texture coordinate data within the quad.
 
int colorOffset () const
 Returns the offset of the RGBA color data within the quad.
 
void populateGeo (Rect &inRect)
 Populates the quad's geometry with the passed rect's geometry.
 
void populateGeo (const Rect &inRect)
 Populates the quad's geometry with the passed rect's geometry.
 
void populateTex (Rect &inRect, const bool &inFlip)
 Populates the quad's texture coordinate data with the passed rect's geometry.
 
void populateTex (const Rect &inRect, const bool &inFlip)
 Populates the quad's texture coordinate data with the passed rect's geometry.
 
void populateColor (VT_RGBA &inColor)
 Populates the quad's RGBA color data with the passed color.
 
void populateColor (const VT_RGBA &inColor)
 Populates the quad's RGBA color data with the passed color.
 

Public Attributes

QuadType bl
 The bottom-left vertex.
 
QuadType br
 The bottom-right vertex.
 
QuadType tl
 The top-left vertex.
 
QuadType tr
 The top-right vertex.
 

Detailed Description

template<typename QuadType>
struct VVGL::Quad< QuadType >

This struct defines a quad- it's a simple template which is expected to be passed one of the structs derived from Vertex as the template type (this template type defines what kind of data the quad will contain). The instance methods make populating the quad with geometry/texture/color data easy, and the stride and offset methods simplify uploading the struct's memory directly to GL.


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