A single shader (vertex, fragment, etc) written GLSL. More...
#include <Luminous/Shader.hpp>
Public Types | |
| enum | Type { Vertex, Fragment, Geometry, TessControl, TessEval, Compute } |
| Type of the shader. More... | |
Public Member Functions | |
| LUMINOUS_API const QString & | filename () const |
| Returns the source code file for the shader. More... | |
| LUMINOUS_API RenderResource::Hash | hash () const |
| Hash for the shader which is calculated based on source code of shader. More... | |
| LUMINOUS_API bool | loadText (const QString &filename) |
| Reads shader from the given file. More... | |
| LUMINOUS_API Shader & | operator= (Shader &&s) |
| LUMINOUS_API void | setText (const QByteArray &src) |
| Sets source code for the shader. More... | |
| LUMINOUS_API | Shader (Type type) |
| Constructor of shader. More... | |
| LUMINOUS_API | Shader (Shader &&s) |
| Move constructor of shader. More... | |
| LUMINOUS_API const QByteArray & | text () const |
| Returns the source code of the shader. More... | |
| LUMINOUS_API Type | type () const |
| Returns the type of the shader. More... | |
| LUMINOUS_API | ~Shader () |
| Destructor of shader. | |
A single shader (vertex, fragment, etc) written GLSL.
| LUMINOUS_API Luminous::Shader::Shader | ( | Type | type | ) |
Constructor of shader.
| type | Type of the shader |
| LUMINOUS_API Luminous::Shader::Shader | ( | Shader && | s | ) |
Move constructor of shader.
| s | Shader to move |
| LUMINOUS_API const QString& Luminous::Shader::filename | ( | ) | const |
Returns the source code file for the shader.
| LUMINOUS_API RenderResource::Hash Luminous::Shader::hash | ( | ) | const |
Hash for the shader which is calculated based on source code of shader.
| LUMINOUS_API bool Luminous::Shader::loadText | ( | const QString & | filename | ) |
Reads shader from the given file.
| filename | File where shader is read |
| s |
| LUMINOUS_API void Luminous::Shader::setText | ( | const QByteArray & | src | ) |
Sets source code for the shader.
| src | Source code for the shader |
| LUMINOUS_API const QByteArray& Luminous::Shader::text | ( | ) | const |
Returns the source code of the shader.
| LUMINOUS_API Type Luminous::Shader::type | ( | ) | const |
Returns the type of the shader.