Maya 1.0
|
A helper class for loading and creating program shaders. More...
#include <mayashader.h>
Public Member Functions | |
MayaShader (const QString &) | |
Create a MayaShader. More... | |
~MayaShader () | |
Destructor. More... | |
GLuint | GetProgram () |
Get the name of the program on the GPU. | |
Static Public Member Functions | |
static GLuint | LoadShaderFromFile (const QString &fileName, GLenum shaderType) |
Load a shader from a file and optionnaly append some code to it. More... | |
Protected Attributes | |
GLuint | name = 0 |
Program name on the gpu. | |
A helper class for loading and creating program shaders.
MayaShader::MayaShader | ( | const QString & | baseFilename | ) |
Create a MayaShader.
Shaders must be name : [baseFilename]_[x]s.glsl where x = v || f || g
baseFilename | Base filename of the shaders. |
References LoadShaderFromFile(), and name.
MayaShader::~MayaShader | ( | ) |
|
static |
Load a shader from a file and optionnaly append some code to it.
fileName | Path to the shader file on disk |
shaderType | Type of the shader to load |
Referenced by MayaShader().