nCine::ShaderState class

Shader state class for the user to use custom shaders.

Constructors, destructors, conversion operators

ShaderState()
ShaderState(DrawableNode* node, Shader* shader)
~ShaderState()
ShaderState(const ShaderState&) deleted

Public functions

auto operator=(const ShaderState&) -> ShaderState& deleted
auto node() const -> const DrawableNode*
auto setNode(DrawableNode* node) -> bool
auto shader() const -> const Shader*
auto setShader(Shader* shader) -> bool
auto resetShader() -> bool
Triggers a shader update without setting a new shader.
auto setTexture(unsigned int unit, const Texture* texture) -> bool
auto setTexture(const Texture* texture) -> bool
auto setUniformInt(const char* blockName, const char* name, const int* vector) -> bool
auto setUniformInt(const char* blockName, const char* name, int value0) -> bool
auto setUniformInt(const char* blockName, const char* name, int value0, int value1) -> bool
auto setUniformInt(const char* blockName, const char* name, int value0, int value1, int value2) -> bool
auto setUniformInt(const char* blockName, const char* name, int value0, int value1, int value2, int value3) -> bool
auto setUniformInt(const char* blockName, const char* name, const Vector2i& vector) -> bool
auto setUniformInt(const char* blockName, const char* name, const Vector3i& vector) -> bool
auto setUniformInt(const char* blockName, const char* name, const Vector4i& vector) -> bool
auto setUniformFloat(const char* blockName, const char* name, const float* vector) -> bool
auto setUniformFloat(const char* blockName, const char* name, float value0) -> bool
auto setUniformFloat(const char* blockName, const char* name, float value0, float value1) -> bool
auto setUniformFloat(const char* blockName, const char* name, float value0, float value1, float value2) -> bool
auto setUniformFloat(const char* blockName, const char* name, float value0, float value1, float value2, float value3) -> bool
auto setUniformFloat(const char* blockName, const char* name, const Vector2f& vector) -> bool
auto setUniformFloat(const char* blockName, const char* name, const Vector3f& vector) -> bool
auto setUniformFloat(const char* blockName, const char* name, const Vector4f& vector) -> bool
auto setUniformFloat(const char* blockName, const char* name, const Colorf& color) -> bool
auto uniformBlockSize(const char* blockName) -> unsigned int
auto copyToUniformBlock(const char* blockName, unsigned int destIndex, unsigned char* src, unsigned int numBytes) -> bool
auto copyToUniformBlock(const char* blockName, unsigned char* src, unsigned int numBytes) -> bool
auto copyToUniformBlock(const char* blockName, unsigned char* src) -> bool