Quantcast
Channel: Shader - Documentation
Browsing latest articles
Browse All 20 View Live

Shader::SetInt

This function sets an integer uniform. Syntaxbool SetInt(const std::string& name, const int& i)bool SetInt(const std::string& name, const int* i, const int& count) Parametersname: the...

View Article



Shader::SetFloat

This function sets a float uniform. Syntaxbool SetFloat(const std::string& name, const float& f)bool SetFloat(const std::string& name, const float* f, const int& count) Parametersname:...

View Article

Shader::SetVec2

This function sets a Vec2 uniform. Syntaxbool SetVec2(const std::string& name, const Vec2& v)bool SetVec2(const std::string& name, const float* v, const int& count) Parametersname: the...

View Article

Shader::SetVec3

This function sets a Vec3 uniform. Syntaxbool SetVec3(const std::string& name, const Vec3& v)bool SetVec3(const std::string& name, const float* v, const int& count) Parametersname: the...

View Article

Shader::SetVec4

This function sets a Vec4 uniform. Syntaxbool SetVec4(const std::string& name, const Vec4& v)bool SetVec4(const std::string& name, const float* v, const int& count) Parametersname: the...

View Article


Shader::SetMat3

This function sets a Mat3 uniform. Syntaxbool SetMat3(const std::string& name, const Mat3& m) Parametersname: the name of the shader uniform.m: a Mat3 value. ReturnsReturns true if the uniform...

View Article

Shader::SetMat4

This function sets a Mat4 uniform. Syntaxbool SetMat4(const std::string& name, const Mat4& m) Parametersname: the name of the shader uniform.m: a Mat4 value. ReturnsReturns true if the uniform...

View Article

Shader::GetInt

This function gets the value of an integer uniform. Syntaxint GetInt(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns an integer value.  If the uniform does...

View Article


Shader::GetFloat

This function gets the value of a float uniform. Syntaxfloat GetFloat(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a float value.  If the uniform does not...

View Article


Shader::GetVec2

This function gets the value of a Vec2 uniform. SyntaxVec2 GetVec2(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a Vec2 value.  If the uniform does not...

View Article

Shader::GetVec3

This function gets the value of a Vec3 uniform. SyntaxVec3 GetVec3(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a Vec3 value.  If the uniform does not...

View Article

Shader::GetVec4

This function gets the value of a Vec4 uniform. SyntaxVec4 GetVec4(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a Vec4 value.  If the uniform does not...

View Article

Shader::GetMat3

This function gets the value of a Mat3 uniform. SyntaxMat3 GetMat3(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a Mat3 value.  If the uniform does not...

View Article


Shader::GetMat4

This function gets the value of a Mat4 uniform. SyntaxMat4 GetMat4(const std::string& name) Parametersname: the name of the shader uniform. ReturnsReturns a Mat4 value.  If the uniform does not...

View Article

Shader::SetSource

This function sets the shader source code.  It can be used to create and test shaders dynamically. Syntaxvoid SetSource(const std::string& source, const int& sourceid) Parameterssource: the...

View Article


Shader::Compile

This function will compile a shader. Syntaxbool Compile(const int& sourceid) Parameterssourceid: The shader component to compile.  This may be Shader::Vertex, Shader::Pixel, Shader::Geometry,...

View Article

Shader::Link

This function links a shader.  A shader must be compiled and linked before it is ready to use. Syntaxbool Link() ReturnsReturns true if the shader is successfully linked, otherwise false is returned....

View Article


Shader::GetLog

This function gets the log text of the last operation performed on a shader.  You can use this to retrieve detailed information from a shader after it is compiled or linked.  The format and content of...

View Article

Shader::Create

This function creates a new shader.  The shader must have source code added, and be compiled and linked before it is usable. Syntaxstatic Shader* Create() ReturnsReturns a new shader.

View Article

Shader::Load

This function loads and returns a shader from a shader (*.shader) file.  The shader will be compiled and linked if it is loaded. Syntaxstatic Shader* Load(const std::string& path, const int&...

View Article
Browsing latest articles
Browse All 20 View Live