Shader Class Reference
[Basic]
GLSL shader with loading and compiling capabilities.
More...
#include <Shader.hpp>
List of all members.
Public Member Functions |
| Shader (const Tag &tag) |
| ~Shader () |
void | associate () |
void | finalize () |
string | getFilename () const |
GLuint | getHandle () const |
string | getType () const |
void | list () const |
void | log () const |
string | toString () const |
Protected Member Functions |
void | compile () |
void | create () |
void | load () |
Private Attributes |
const char ** | source |
GLuint | handle |
int | length |
Preprocessor | preprocessor |
string | filename |
string | type |
Detailed Description
GLSL shader with loading and compiling capabilities.
Constructor & Destructor Documentation
Creates a new Shader from an XML tag.
- Parameters:
-
| tag | XML tag with "type" and "file" attributes. |
- Exceptions:
-
Cleans up the source array allocated by the Shader object.
Member Function Documentation
void associate |
( |
|
) |
[virtual] |
Attaches the shader to a program and compiles the shader.
- Exceptions:
-
Reimplemented from Node.
void compile |
( |
|
) |
[protected] |
Compiles the shader and prints the log..
- Exceptions:
-
void create |
( |
|
) |
[protected] |
Requests a handle to a new GLSL shader of the correct type.
- Exceptions:
-
Prints the file stored in the source array.
void load |
( |
|
) |
[protected] |
Loads a file into the Shader's source array and passes it to OpenGL.
- Exceptions:
-
Prints the log for this shader.
string toString |
( |
|
) |
const [virtual] |
Forms a string from the object's attributes.
Reimplemented from Node.
The documentation for this class was generated from the following files: