#include <lvt/Shader.h>
Inheritance diagram for Shader:
To compile a shader, first attach source files to the object with AddVertexSource() and AddFragmentSource(), then compile and link the program with Compile(). If there are errors, use GetInfoLog() to retrieve the compilation log.
A Shader is a State. Shader::Disable will disable the programmable pipeline, and enable the fixed-function pipeline.
Public Member Functions | |
void | AddFragmentSource (const std::string &fileName) |
Adds a fragment program source file to the list of files to be compiled. | |
void | AddVertexSource (const std::string &fileName) |
Adds a vertex program source file to the list of files to be compiled. | |
virtual bool | Compile () |
Compiles the fragment and vertex source files into a shader program. | |
virtual std::string | GetInfoLog () |
Returns the info log with the results of shader compilation. | |
virtual void | Render () |
Disables the fixed-function pipeline and makes this Shader object the active shader program. | |
virtual void | SetUniform (const char *name, int p1, int p2, int p3, int p4) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, int p1, int p2, int p3) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, int p1, int p2) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, int p1) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, float p1, float p2, float p3, float p4) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, float p1, float p2, float p3) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, float p1, float p2) |
Sets the value of a uniform variable. | |
virtual void | SetUniform (const char *name, float p1) |
Sets the value of a uniform variable. |
|
Adds a fragment program source file to the list of files to be compiled.
|
|
Adds a vertex program source file to the list of files to be compiled.
|
|
Compiles the fragment and vertex source files into a shader program. Returns true if the compilation and linking was successful. |
|
Returns the info log with the results of shader compilation.
|
|
Disables the fixed-function pipeline and makes this Shader object the active shader program.
Implements State. |
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|
|
Sets the value of a uniform variable.
|