17 #ifndef INSTANCEDSHADER_H
18 #define INSTANCEDSHADER_H
69 virtual bool isValid()
const override;
88 virtual void begin()
override;
94 virtual void end()
override;
98 virtual void compile()
override;
129 bool mCurrentShader =
false;
132 #endif // INSTANCEDSHADER_H
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
Shader which has instanced values for uniforms and other GL state.
Definition: InstancedShader.h:46
virtual std::string getErrorLog() const override
Retrieves the string describing compilation errors, if the call to compile() failed and isValid() is ...
virtual GLuint getProgramId() const override
Returns the GL program id for this shader.
virtual bool isCompiled() const override
Returns whether or not this shader has been processed for compilation.
Shader program abstract base class.
Definition: Shader.h:47
InstancedShader(const ShaderPtr &sharedShader)
Create an InstancedShader which references a shader Shader.
void setIndexedTexture(int index, int stage, const TexturePtr &value, TexturePtr *stateValue)
Set the indexed texture for this instance at the given index.
const ShaderPtr & getSharedShader() const
Returns the Shader that is shared among instances.
Definition: InstancedShader.h:59
virtual int getUniformLocation(int index) const override
Returns the location of an indexed uniform.
std::shared_ptr< Texture > TexturePtr
Shared pointer typedef for Texture.
Definition: PointerDeclarations.h:173
virtual void begin() override
Binds this shader, and sets uniforms and other GL state associated with this instance.
std::shared_ptr< Shader > ShaderPtr
Shared pointer typedef for Shader.
Definition: PointerDeclarations.h:143
virtual void updateState()
Update state in response to this instance getting bound.
virtual bool isValid() const override
Returns whether or not this shader is valid (compiled and linked) and can be used for rendering...
virtual void end() override
Unbinds this shader if bound by a corresponding call to begin().
virtual bool isCurrent() const override
Returns whether or not this instance is bound.
virtual void compile() override
Compiles this shader, resulting in the compilation of the shared Shader if necessary.
virtual int getAttributeLocation(int index) const override
Returns the location of an indexed Attribute.