CUGL 2.1
Cornell University Game Library
Static Public Member Functions | Public Attributes | List of all members
cugl::SpriteVertex3 Class Reference

#include <CUSpriteVertex.h>

Static Public Member Functions

static const GLvoid * positionOffset ()
 
static const GLvoid * colorOffset ()
 
static const GLvoid * texcoordOffset ()
 
static const GLvoid * gradcoordOffset ()
 

Public Attributes

cugl::Vec3 position
 
GLuint color
 
cugl::Vec2 texcoord
 
cugl::Vec2 gradcoord
 

Detailed Description

This class/struct is rendering information for a 2d sprite batch vertex.

The class is intended to be used as a struct. This struct has the basic rendering information required by a SpriteBatch for rendering. Even though sprite batches are a 2d rendering pipeline, they can use the z value for depth testing, enabling out of order drawing.

Note that the exact meaning of these attributes can vary depending upon the current drawing mode in the sprite batch. For example, if the color is a gradient, rather than a pure color, then the color attribute holds the texture coordinates (plus additional modulation factors) for that gradient, and not a real color value.

Member Function Documentation

◆ colorOffset()

static const GLvoid* cugl::SpriteVertex3::colorOffset ( )
inlinestatic

The memory offset of the vertex color

◆ gradcoordOffset()

static const GLvoid* cugl::SpriteVertex3::gradcoordOffset ( )
inlinestatic

The memory offset of the vertex texture coordinate

◆ positionOffset()

static const GLvoid* cugl::SpriteVertex3::positionOffset ( )
inlinestatic

The memory offset of the vertex position

◆ texcoordOffset()

static const GLvoid* cugl::SpriteVertex3::texcoordOffset ( )
inlinestatic

The memory offset of the vertex texture coordinate

Member Data Documentation

◆ color

GLuint cugl::SpriteVertex3::color

The vertex color (or texture gradient texture coordinates)

◆ gradcoord

cugl::Vec2 cugl::SpriteVertex3::gradcoord

The vertex gradient coordinate

◆ position

cugl::Vec3 cugl::SpriteVertex3::position

The vertex position

◆ texcoord

cugl::Vec2 cugl::SpriteVertex3::texcoord

The vertex texture coordinate


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