34 ShaderMan.registerShaderProgram(vertShader, fragShader);
35 program =
ShaderMan.getShaderProgram(vertShader, fragShader);
51 ShaderInstance::ShaderInstance(
const std::string &vertName,
const std::string &fragName) : _vertexVariableData(), _fragmentVariableData(), _sourceProgram(0) {
56 ShaderMan.registerShaderProgram(vertShader, fragShader);
57 program =
ShaderMan.getShaderProgram(vertShader, fragShader);
void rebindVertexVariable(uint32 index)
std::vector< const void * > _fragmentVariableData
ShaderInstance(Shader::ShaderObject *vertShader, Shader::ShaderObject *fragShader)
void setVertexVariable(const std::string &name, const void *location)
ShaderObject * fragmentObject
std::vector< GLint > fragmentVariableLocations
void setFragmentVariable(const std::string &name, const void *location)
ShaderObject * vertexObject
Shader instancing, allowing for easier shader resource sharing.
void rebindFragmentVariable(uint32 index)
#define ShaderMan
Shortcut for accessing the shader manager.
std::vector< GLint > vertexVariableLocations
Shader::ShaderProgram * _sourceProgram
std::vector< const void * > _vertexVariableData
std::vector< ShaderObject::ShaderObjectVariable > variablesCombined