Owns the GX2 fetch shader program that binds vertex attribute streams to a vertex shader. More...
#include <FetchShader.h>
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) | |
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.
|
inline |
Builds a fetch shader for the given vertex attribute streams.
| attributes | Attribute stream descriptions, in vertex shader input order |
| attrCount | Number of entries in attributes |
| type | GX2 fetch shader type |
| tess | GX2 tessellation mode |
Definition at line 24 of file FetchShader.h.
|
inlinevirtual |
Definition at line 39 of file FetchShader.h.
|
inline |
Binds this fetch shader for subsequent draws.
Definition at line 48 of file FetchShader.h.
|
protected |
The GX2 fetch shader object (nullptr if allocation failed)
Definition at line 54 of file FetchShader.h.
|
protected |
Aligned program memory the fetch shader executes from.
Definition at line 55 of file FetchShader.h.