Base class for rendering 3D shaders.
More...
#include <V3DShader.h>
|
|
void | Bind () const |
| | Bind texture to the current scene.
|
| |
| void | LoadFromFile (const sf::String &vertexFile, const sf::String &geometryFile, const sf::String &fragmentFile) |
| |
| void | LoadFromFile (const sf::String &vertexFile, const sf::String &fragmentFile) |
| |
| void | LoadFromFile (const sf::String &filename, ShaderType type) |
| |
| void | LoadFromMemory (const std::string &vertexShader, const std::string &geometryShader, const std::string &fragmentShader) |
| |
| void | LoadFromMemory (const std::string &vertexShader, const std::string &fragmentShader) |
| |
| void | LoadFromMemory (const std::string &shader, ShaderType type) |
| |
| void | SetAttribute (V3DVertexAttribute Attribute, const std::string &name) |
| |
| virtual void | UpdateUniform (UniformType type, void *data) |
| |
| GLuint | GetProgram () |
| |
| GLuint | GetShader (ShaderType type) |
| |
| GLuint | GetUniform (UniformType type) |
| |
| void | SetCamera (V3DCamera *camera) |
| |
|
virtual void | Update () |
| | Update the shader.
|
| |
Base class for rendering 3D shaders.
◆ GetProgram()
| GLuint V3DShader::GetProgram |
( |
| ) |
|
- Returns
- The shader program ID.
◆ GetShader()
- Parameters
-
- Returns
- The shader ID.
◆ GetUniform()
- Parameters
-
- Returns
- The uniform ID.
◆ LoadFromFile() [1/3]
| void V3DShader::LoadFromFile |
( |
const sf::String & |
vertexFile, |
|
|
const sf::String & |
geometryFile, |
|
|
const sf::String & |
fragmentFile |
|
) |
| |
Loads shader from a file.
- Parameters
-
| vertexFile | The file path and name of the vertex file. |
| geometryFile | The file path and name of the geometry file. |
| fragmentFile | The file path and name of the fragment file. |
◆ LoadFromFile() [2/3]
| void V3DShader::LoadFromFile |
( |
const sf::String & |
vertexFile, |
|
|
const sf::String & |
fragmentFile |
|
) |
| |
Loads shader from a file.
- Parameters
-
| vertexFile | The file path and name of the vertex file. |
| fragmentFile | The file path and name of the fragment file. |
◆ LoadFromFile() [3/3]
| void V3DShader::LoadFromFile |
( |
const sf::String & |
filename, |
|
|
ShaderType |
type |
|
) |
| |
Loads shader from a file.
- Parameters
-
| filename | The file path and name of the shader file. |
| type | The type of shader this is. |
◆ LoadFromMemory() [1/3]
| void V3DShader::LoadFromMemory |
( |
const std::string & |
vertexShader, |
|
|
const std::string & |
geometryShader, |
|
|
const std::string & |
fragmentShader |
|
) |
| |
Loads shader from memory (like a string).
- Parameters
-
| vertexShader | The vertex shader data. |
| geometryShader | The geometry shader data. |
| fragmentShader | The fragment shader data. |
◆ LoadFromMemory() [2/3]
| void V3DShader::LoadFromMemory |
( |
const std::string & |
vertexShader, |
|
|
const std::string & |
fragmentShader |
|
) |
| |
Loads shader from memory (like a string).
- Parameters
-
| vertexShader | The vertex shader data. |
| fragmentShader | The fragment shader data. |
◆ LoadFromMemory() [3/3]
| void V3DShader::LoadFromMemory |
( |
const std::string & |
shader, |
|
|
ShaderType |
type |
|
) |
| |
Loads shader from memory (like a string).
- Parameters
-
| shader | The vertex shader data. |
| type | The type of shader this is. |
◆ SetAttribute()
Set the name of a vertex attribute in a shader.
- Parameters
-
| Attribute | Vertex Attribute Type. |
| name | Name of the variable in the shader this attribute associates with. |
◆ SetCamera()
| void V3DShader::SetCamera |
( |
V3DCamera * |
camera | ) |
|
- Parameters
-
| camera | Pointer to the currently referenced Camera. |
◆ UpdateUniform()
| virtual void V3DShader::UpdateUniform |
( |
UniformType |
type, |
|
|
void * |
data |
|
) |
| |
|
virtual |
Set the name of a vertex attribute in a shader.
- Parameters
-
| type | The Uniform type. |
| data | The data you want to set the Uniform to. |
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/V3DShader.h