Represents an OpenGL GLSL program. Implicitly shared object. More...
#include <GlslProg.h>
Classes | |
| struct | Obj |
Public Member Functions | |
| GlslProg () | |
| GlslProg (DataSourceRef vertexShader, DataSourceRef fragmentShader=DataSourceRef(), DataSourceRef geometryShader=DataSourceRef(), GLint geometryInputType=GL_POINTS, GLint geometryOutputType=GL_TRIANGLES, GLint geometryOutputVertices=0) | |
| GlslProg (const char *vertexShader, const char *fragmentShader=0, const char *geometryShader=0, GLint geometryInputType=GL_POINTS, GLint geometryOutputType=GL_TRIANGLES, GLint geometryOutputVertices=0) | |
| void | bind () const |
| GLuint | getHandle () const |
| void | uniform (const std::string &name, int data) |
| void | uniform (const std::string &name, const Vec2i &data) |
| void | uniform (const std::string &name, const int *data, int count) |
| void | uniform (const std::string &name, const Vec2i *data, int count) |
| void | uniform (const std::string &name, float data) |
| void | uniform (const std::string &name, const Vec2f &data) |
| void | uniform (const std::string &name, const Vec3f &data) |
| void | uniform (const std::string &name, const Vec4f &data) |
| void | uniform (const std::string &name, const Color &data) |
| void | uniform (const std::string &name, const ColorA &data) |
| void | uniform (const std::string &name, const Matrix22f &data, bool transpose=false) |
| void | uniform (const std::string &name, const Matrix33f &data, bool transpose=false) |
| void | uniform (const std::string &name, const Matrix44f &data, bool transpose=false) |
| void | uniform (const std::string &name, const float *data, int count) |
| void | uniform (const std::string &name, const Vec2f *data, int count) |
| void | uniform (const std::string &name, const Vec3f *data, int count) |
| void | uniform (const std::string &name, const Vec4f *data, int count) |
| void | uniform (const std::string &name, const Matrix22f *data, int count, bool transpose=false) |
| void | uniform (const std::string &name, const Matrix33f *data, int count, bool transpose=false) |
| void | uniform (const std::string &name, const Matrix44f *data, int count, bool transpose=false) |
| GLint | getUniformLocation (const std::string &name) |
| GLint | getAttribLocation (const std::string &name) |
| std::string | getShaderLog (GLuint handle) const |
Static Public Member Functions | |
| static GlslProgRef | create (DataSourceRef vertexShader, DataSourceRef fragmentShader=DataSourceRef(), DataSourceRef geometryShader=DataSourceRef(), GLint geometryInputType=GL_POINTS, GLint geometryOutputType=GL_TRIANGLES, GLint geometryOutputVertices=0) |
| static GlslProgRef | create (const char *vertexShader, const char *fragmentShader=0, const char *geometryShader=0, GLint geometryInputType=GL_POINTS, GLint geometryOutputType=GL_TRIANGLES, GLint geometryOutputVertices=0) |
| static void | unbind () |
Protected Member Functions | |
| void | loadShader (Buffer shaderSourceBuffer, GLint shaderType) |
| void | loadShader (const char *shaderSource, GLint shaderType) |
| void | attachShaders () |
| void | link () |
Protected Attributes | |
| std::shared_ptr< Obj > | mObj |
| typedef std::shared_ptr< Obj > GlslProg::* | unspecified_bool_type |
| Emulates shared_ptr-like behavior. | |
| operator unspecified_bool_type () const | |
| Emulates shared_ptr-like behavior. | |
| void | reset () |
| Emulates shared_ptr-like behavior. | |
Represents an OpenGL GLSL program. Implicitly shared object.
| typedef std::shared_ptr<Obj> GlslProg::* cinder::gl::GlslProg::unspecified_bool_type |
Emulates shared_ptr-like behavior.
| cinder::gl::GlslProg::GlslProg | ( | DataSourceRef | vertexShader, |
| DataSourceRef | fragmentShader = DataSourceRef(), |
||
| DataSourceRef | geometryShader = DataSourceRef(), |
||
| GLint | geometryInputType = GL_POINTS, |
||
| GLint | geometryOutputType = GL_TRIANGLES, |
||
| GLint | geometryOutputVertices = 0 |
||
| ) |
| cinder::gl::GlslProg::GlslProg | ( | const char * | vertexShader, |
| const char * | fragmentShader = 0, |
||
| const char * | geometryShader = 0, |
||
| GLint | geometryInputType = GL_POINTS, |
||
| GLint | geometryOutputType = GL_TRIANGLES, |
||
| GLint | geometryOutputVertices = 0 |
||
| ) |
| static GlslProgRef cinder::gl::GlslProg::create | ( | DataSourceRef | vertexShader, |
| DataSourceRef | fragmentShader = DataSourceRef(), |
||
| DataSourceRef | geometryShader = DataSourceRef(), |
||
| GLint | geometryInputType = GL_POINTS, |
||
| GLint | geometryOutputType = GL_TRIANGLES, |
||
| GLint | geometryOutputVertices = 0 |
||
| ) | [static] |
| static GlslProgRef cinder::gl::GlslProg::create | ( | const char * | vertexShader, |
| const char * | fragmentShader = 0, |
||
| const char * | geometryShader = 0, |
||
| GLint | geometryInputType = GL_POINTS, |
||
| GLint | geometryOutputType = GL_TRIANGLES, |
||
| GLint | geometryOutputVertices = 0 |
||
| ) | [static] |
| void cinder::gl::GlslProg::bind | ( | ) | const |
| void cinder::gl::GlslProg::unbind | ( | ) | [static] |
| GLuint cinder::gl::GlslProg::getHandle | ( | ) | const |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| int | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec2i & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const int * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec2i * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| float | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec2f & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec3f & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec4f & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Color & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const ColorA & | data | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix22f & | data, | ||
| bool | transpose = false |
||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix33f & | data, | ||
| bool | transpose = false |
||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix44f & | data, | ||
| bool | transpose = false |
||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const float * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec2f * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec3f * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Vec4f * | data, | ||
| int | count | ||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix22f * | data, | ||
| int | count, | ||
| bool | transpose = false |
||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix33f * | data, | ||
| int | count, | ||
| bool | transpose = false |
||
| ) |
| void cinder::gl::GlslProg::uniform | ( | const std::string & | name, |
| const Matrix44f * | data, | ||
| int | count, | ||
| bool | transpose = false |
||
| ) |
| GLint cinder::gl::GlslProg::getUniformLocation | ( | const std::string & | name | ) |
| GLint cinder::gl::GlslProg::getAttribLocation | ( | const std::string & | name | ) |
| std::string cinder::gl::GlslProg::getShaderLog | ( | GLuint | handle | ) | const |
| void cinder::gl::GlslProg::loadShader | ( | Buffer | shaderSourceBuffer, |
| GLint | shaderType | ||
| ) | [protected] |
| void cinder::gl::GlslProg::loadShader | ( | const char * | shaderSource, |
| GLint | shaderType | ||
| ) | [protected] |
| void cinder::gl::GlslProg::attachShaders | ( | ) | [protected] |
| void cinder::gl::GlslProg::link | ( | ) | [protected] |
| cinder::gl::GlslProg::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
| void cinder::gl::GlslProg::reset | ( | ) |
Emulates shared_ptr-like behavior.
std::shared_ptr<Obj> cinder::gl::GlslProg::mObj [protected] |