Encapsultation of the raylib Shader NOTE: Shader functionality is not available on OpenGL 1.1.
More...
#include <RlShader.hpp>
Encapsultation of the raylib Shader NOTE: Shader functionality is not available on OpenGL 1.1.
◆ RlShader()
| raylib::shader::RlShader::RlShader |
( |
| ) |
|
◆ ~RlShader()
| raylib::shader::RlShader::~RlShader |
( |
| ) |
|
◆ getLocation()
| int raylib::shader::RlShader::getLocation |
( |
const std::string & |
uniformName | ) |
|
Get shader uniform location.
- Parameters
-
- Returns
- the location of the uniform
◆ getLocationAttrib()
| int raylib::shader::RlShader::getLocationAttrib |
( |
const std::string & |
attribName | ) |
|
Get shader attribute location.
- Parameters
-
- Returns
- the location of the attribute
◆ getShader()
| const Shader & raylib::shader::RlShader::getShader |
( |
| ) |
const |
Get the raylib Shader's.
- Returns
- the raylib Shader
◆ load()
| void raylib::shader::RlShader::load |
( |
const std::string & |
vsFileName, |
|
|
const std::string & |
fsFileName |
|
) |
| |
Load a shader from a file.
- Parameters
-
| vsFileName | the vertex shader file name |
| fsFileName | the fragment shader file name |
◆ loadFromMemory()
| void raylib::shader::RlShader::loadFromMemory |
( |
const std::string & |
vsCode, |
|
|
const std::string & |
fsCode |
|
) |
| |
Load a shader from code strings.
- Parameters
-
| vsCode | the vertex shader code |
| fsCode | the fragment shader code |
◆ setValue()
| void raylib::shader::RlShader::setValue |
( |
int |
locIndex, |
|
|
const void * |
value, |
|
|
int |
uniformType |
|
) |
| |
Set shader uniform value.
- Parameters
-
| locIndex | to set |
| value | to set |
| uniformType | to set |
◆ setValueMatrix()
| void raylib::shader::RlShader::setValueMatrix |
( |
int |
locIndex, |
|
|
const Matrix & |
mat |
|
) |
| |
Set shader uniform value (matrix 4x4)
- Parameters
-
◆ setValueTexture()
| void raylib::shader::RlShader::setValueTexture |
( |
int |
locIndex, |
|
|
const texture::RlTexture & |
texture |
|
) |
| |
Set shader uniform value for texture (sampler2d)
- Parameters
-
| locIndex | to set |
| texture | to set |
◆ setValueV()
| void raylib::shader::RlShader::setValueV |
( |
int |
locIndex, |
|
|
const void * |
value, |
|
|
int |
uniformType, |
|
|
int |
count |
|
) |
| |
Set shader uniform value vector.
- Parameters
-
| locIndex | to set |
| value | to set |
| uniformType | to set |
| count | to set |
The documentation for this class was generated from the following files: