|
AvogadroLibs
1.95.1
|
Vertex or Fragment shader, combined into a ShaderProgram. More...
#include <avogadro/rendering/shader.h>
Public Types | |
| enum | Type { Vertex, Fragment, Unknown } |
Public Member Functions | |
| Shader (Type type=Unknown, const std::string &source="") | |
| void | setType (Type type) |
| Type | type () const |
| void | setSource (const std::string &source) |
| std::string | source () const |
| std::string | error () const |
| Index | handle () const |
| bool | compile () |
| void | cleanup () |
Protected Attributes | |
| Type | m_type |
| Index | m_handle |
| bool | m_dirty |
| std::string | m_source |
| std::string | m_error |
This class creates a Vertex or Fragment shader, that can be attached to a ShaderProgram in order to render geometry etc.
| enum Type |
| void setType | ( | Type | type | ) |
Set the shader type.
| Type type | ( | ) | const |
Get the shader type, typically Vertex or Fragment.
| void setSource | ( | const std::string & | source | ) |
Set the shader source to the supplied string.
| std::string source | ( | ) | const |
Get the source for the shader.
| std::string error | ( | ) | const |
Get the error message (empty if none) for the shader.
| Index handle | ( | ) | const |
Get the handle of the shader.
| bool compile | ( | ) |
Compile the shader.
| void cleanup | ( | ) |
Delete the shader.
1.8.14