xoreos
0.0.5
|
#include <shaderinstance.h>
Public Member Functions | |
ShaderInstance (Shader::ShaderObject *vertShader, Shader::ShaderObject *fragShader) | |
ShaderInstance (const std::string &vertName, const std::string &fragName) | |
~ShaderInstance () | |
void | setVertexVariable (const std::string &name, const void *location) |
void | setFragmentVariable (const std::string &name, const void *location) |
void | bind () |
void | unbind () |
void | rebindVertexVariable (uint32 index) |
void | rebindFragmentVariable (uint32 index) |
Private Attributes | |
std::vector< const void * > | _vertexVariableData |
std::vector< const void * > | _fragmentVariableData |
Shader::ShaderProgram * | _sourceProgram |
Definition at line 34 of file shaderinstance.h.
Graphics::Shader::ShaderInstance::ShaderInstance | ( | Shader::ShaderObject * | vertShader, |
Shader::ShaderObject * | fragShader | ||
) |
Definition at line 31 of file shaderinstance.cpp.
References _fragmentVariableData, _sourceProgram, _vertexVariableData, Graphics::Shader::ShaderProgram::fragmentObject, ShaderMan, Graphics::Shader::ShaderProgram::usageCount, Graphics::Shader::ShaderObject::variablesCombined, and Graphics::Shader::ShaderProgram::vertexObject.
Graphics::Shader::ShaderInstance::ShaderInstance | ( | const std::string & | vertName, |
const std::string & | fragName | ||
) |
Definition at line 51 of file shaderinstance.cpp.
References _fragmentVariableData, _sourceProgram, _vertexVariableData, Graphics::Shader::ShaderProgram::fragmentObject, Graphics::Shader::SHADER_FRAGMENT, Graphics::Shader::SHADER_VERTEX, ShaderMan, Graphics::Shader::ShaderProgram::usageCount, Graphics::Shader::ShaderObject::variablesCombined, and Graphics::Shader::ShaderProgram::vertexObject.
Graphics::Shader::ShaderInstance::~ShaderInstance | ( | ) |
Definition at line 75 of file shaderinstance.cpp.
References _sourceProgram, and Graphics::Shader::ShaderProgram::usageCount.
void Graphics::Shader::ShaderInstance::bind | ( | ) |
Definition at line 97 of file shaderinstance.cpp.
References _fragmentVariableData, _sourceProgram, _vertexVariableData, and ShaderMan.
void Graphics::Shader::ShaderInstance::rebindFragmentVariable | ( | uint32 | index | ) |
Definition at line 109 of file shaderinstance.cpp.
References _fragmentVariableData, _sourceProgram, Graphics::Shader::ShaderProgram::fragmentObject, Graphics::Shader::ShaderProgram::fragmentVariableLocations, ShaderMan, and Graphics::Shader::ShaderObject::variablesCombined.
void Graphics::Shader::ShaderInstance::rebindVertexVariable | ( | uint32 | index | ) |
Definition at line 105 of file shaderinstance.cpp.
References _sourceProgram, _vertexVariableData, ShaderMan, Graphics::Shader::ShaderObject::variablesCombined, Graphics::Shader::ShaderProgram::vertexObject, and Graphics::Shader::ShaderProgram::vertexVariableLocations.
void Graphics::Shader::ShaderInstance::setFragmentVariable | ( | const std::string & | name, |
const void * | location | ||
) |
Definition at line 88 of file shaderinstance.cpp.
References _fragmentVariableData, _sourceProgram, Graphics::Shader::ShaderProgram::fragmentObject, and Graphics::Shader::ShaderObject::variablesCombined.
void Graphics::Shader::ShaderInstance::setVertexVariable | ( | const std::string & | name, |
const void * | location | ||
) |
Definition at line 79 of file shaderinstance.cpp.
References _sourceProgram, _vertexVariableData, Graphics::Shader::ShaderObject::variablesCombined, and Graphics::Shader::ShaderProgram::vertexObject.
void Graphics::Shader::ShaderInstance::unbind | ( | ) |
Definition at line 101 of file shaderinstance.cpp.
|
private |
Definition at line 51 of file shaderinstance.h.
Referenced by bind(), rebindFragmentVariable(), setFragmentVariable(), and ShaderInstance().
|
private |
Definition at line 52 of file shaderinstance.h.
Referenced by bind(), rebindFragmentVariable(), rebindVertexVariable(), setFragmentVariable(), setVertexVariable(), ShaderInstance(), and ~ShaderInstance().
|
private |
Definition at line 50 of file shaderinstance.h.
Referenced by bind(), rebindVertexVariable(), setVertexVariable(), and ShaderInstance().