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

Owns the GX2 fetch shader program that binds vertex attribute streams to a vertex shader. More...

#include <FetchShader.h>

Inheritance diagram for FetchShader:
[legend]

Public Member Functions

 FetchShader (GX2AttribStream *attributes, uint32_t attrCount, GX2FetchShaderType type=GX2_FETCH_SHADER_TESSELLATION_NONE, GX2TessellationMode tess=GX2_TESSELLATION_MODE_DISCRETE)
 Builds a fetch shader for the given vertex attribute streams.
 
void setShader () const
 Binds this fetch shader for subsequent draws.
 

Protected Attributes

GX2FetchShader * fetchShader
 The GX2 fetch shader object (nullptr if allocation failed)
 
void * fetchShaderProgram
 Aligned program memory the fetch shader executes from.
 

Additional Inherited Members

- Static Public Member Functions inherited from Shader
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 inherited from Shader
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

Owns the GX2 fetch shader program that binds vertex attribute streams to a vertex shader.

Built once from a fixed GX2AttribStream list and bound via setShader() before each draw.

Definition at line 16 of file FetchShader.h.

Constructor & Destructor Documentation

◆ FetchShader()

FetchShader::FetchShader ( GX2AttribStream * attributes,
uint32_t attrCount,
GX2FetchShaderType type = GX2_FETCH_SHADER_TESSELLATION_NONE,
GX2TessellationMode tess = GX2_TESSELLATION_MODE_DISCRETE )
inline

Builds a fetch shader for the given vertex attribute streams.

Parameters
attributesAttribute stream descriptions, in vertex shader input order
attrCountNumber of entries in attributes
typeGX2 fetch shader type
tessGX2 tessellation mode

Definition at line 24 of file FetchShader.h.

◆ ~FetchShader()

virtual FetchShader::~FetchShader ( )
inlinevirtual

Definition at line 39 of file FetchShader.h.

Member Function Documentation

◆ setShader()

void FetchShader::setShader ( ) const
inline

Binds this fetch shader for subsequent draws.

Definition at line 48 of file FetchShader.h.

Member Data Documentation

◆ fetchShader

GX2FetchShader* FetchShader::fetchShader
protected

The GX2 fetch shader object (nullptr if allocation failed)

Definition at line 54 of file FetchShader.h.

◆ fetchShaderProgram

void* FetchShader::fetchShaderProgram
protected

Aligned program memory the fetch shader executes from.

Definition at line 55 of file FetchShader.h.


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