Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <GLSL.hpp>

Public Member Functions | |
| GLSLShader (EShaderType type, const String &source=String()) | |
| ~GLSLShader () | |
| virtual const char * | className () |
| Returns the name of the class. | |
| EShaderType | type () const |
| void | setSource (const std::string &source) |
| Sets the sources for this shader and schedules a recompilation for it. | |
| void | setSource (const String &source) |
| Sets the sources for this shader and schedules a recompilation for it. | |
| const std::string & | source () const |
| Returns the sources for this shader. | |
| bool | compile () |
| Compiles the shader, see also http://www.opengl.org/sdk/docs/man/xhtml/glCompileShader.xml for more information. | |
| bool | compileStatus () const |
| Returns true if the shader has been succesfully compiled. | |
| String | infoLog () const |
| Returns a String object containing this shader's info log as returned by glGetShaderInfoLog(), see also http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderInfoLog.xml for more information. | |
| void | createShader () |
| Creates the shader using the OpenGL function glCreateShader(), see also http://www.opengl.org/sdk/docs/man/xhtml/glCreateShader.xml for more information. | |
| void | deleteShader () |
| Deletes the shader using the OpenGL function glDeleteShader(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDeleteShader.xml for more information. | |
| unsigned int | handle () const |
| The handle of this OpenGL shader object as returned by glCreateShader(). | |
Protected Attributes | |
| EShaderType | mType |
| std::string | mSource |
| unsigned int | mHandle |
| bool | mCompiled |
| GLSLShader::GLSLShader | ( | EShaderType | type, | |
| const String & | source = String() | |||
| ) |
| GLSLShader::~GLSLShader | ( | ) |
| virtual const char* vl::GLSLShader::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::Object.
Reimplemented in vl::GLSLVertexShader, vl::GLSLFragmentShader, and vl::GLSLGeometryShader.
| EShaderType vl::GLSLShader::type | ( | ) | const [inline] |
| void GLSLShader::setSource | ( | const std::string & | source | ) |
Sets the sources for this shader and schedules a recompilation for it.
| void GLSLShader::setSource | ( | const String & | source | ) |
Sets the sources for this shader and schedules a recompilation for it.
| const std::string& vl::GLSLShader::source | ( | ) | const [inline] |
Returns the sources for this shader.
| bool GLSLShader::compile | ( | ) |
Compiles the shader, see also http://www.opengl.org/sdk/docs/man/xhtml/glCompileShader.xml for more information.
This function also create the shader if handle() == 0 using the OpenGL function glCreateShader(), see also http://www.opengl.org/sdk/docs/man/xhtml/glCreateShader.xml
| bool GLSLShader::compileStatus | ( | ) | const |
Returns true if the shader has been succesfully compiled.
The check is done using the OpenGL function glGetShaderiv(), see also http://www.opengl.org/sdk/docs/man/xhtml/glGetShader.xml for more information.
| String GLSLShader::infoLog | ( | ) | const |
Returns a String object containing this shader's info log as returned by glGetShaderInfoLog(), see also http://www.opengl.org/sdk/docs/man/xhtml/glGetShaderInfoLog.xml for more information.
| void GLSLShader::createShader | ( | ) |
Creates the shader using the OpenGL function glCreateShader(), see also http://www.opengl.org/sdk/docs/man/xhtml/glCreateShader.xml for more information.
| void GLSLShader::deleteShader | ( | ) |
Deletes the shader using the OpenGL function glDeleteShader(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDeleteShader.xml for more information.
| unsigned int vl::GLSLShader::handle | ( | ) | const [inline] |
The handle of this OpenGL shader object as returned by glCreateShader().
EShaderType vl::GLSLShader::mType [protected] |
std::string vl::GLSLShader::mSource [protected] |
unsigned int vl::GLSLShader::mHandle [protected] |
bool vl::GLSLShader::mCompiled [protected] |