libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
Shader Class Reference

Common base for the GX2 shader wrappers below - just the vertex attribute size constants and the shared GX2DrawEx() call. More...

#include <Shader.h>

Inheritance diagram for Shader:
[legend]

Static Public Member Functions

static void draw (int32_t primitive=GX2_PRIMITIVE_MODE_QUADS, uint32_t vtxCount=4)
 Issues the draw call for the currently bound shaders and attribute buffers.
 

Static Public Attributes

static const uint16_t cuVertexAttrSize = sizeof(float) * 3
 Size in bytes of one position vertex (3 floats)
 
static const uint16_t cuTexCoordAttrSize = sizeof(float) * 2
 Size in bytes of one texture coordinate (2 floats)
 
static const uint16_t cuColorAttrSize = sizeof(uint8_t) * 4
 Size in bytes of one vertex color (4 bytes, RGBA)
 

Detailed Description

Common base for the GX2 shader wrappers below - just the vertex attribute size constants and the shared GX2DrawEx() call.

Definition at line 65 of file Shader.h.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( )
inlineprotected

Definition at line 68 of file Shader.h.

◆ ~Shader()

virtual Shader::~Shader ( )
inlineprotectedvirtual

Definition at line 69 of file Shader.h.

Member Function Documentation

◆ draw()

static void Shader::draw ( int32_t primitive = GX2_PRIMITIVE_MODE_QUADS,
uint32_t vtxCount = 4 )
inlinestatic

Issues the draw call for the currently bound shaders and attribute buffers.

Parameters
primitiveA GX2PrimitiveMode value; a quad by default
vtxCountNumber of vertices to draw

Definition at line 81 of file Shader.h.

Member Data Documentation

◆ cuColorAttrSize

const uint16_t Shader::cuColorAttrSize = sizeof(uint8_t) * 4
static

Size in bytes of one vertex color (4 bytes, RGBA)

Definition at line 76 of file Shader.h.

◆ cuTexCoordAttrSize

const uint16_t Shader::cuTexCoordAttrSize = sizeof(float) * 2
static

Size in bytes of one texture coordinate (2 floats)

Definition at line 74 of file Shader.h.

◆ cuVertexAttrSize

const uint16_t Shader::cuVertexAttrSize = sizeof(float) * 3
static

Size in bytes of one position vertex (3 floats)

Definition at line 72 of file Shader.h.


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