Represents an OpenGL GLSL program. Implicitly shared object. More...
#include <GlslProg.h>
Classes | |
struct | Obj |
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. More... | |
operator unspecified_bool_type () const | |
Emulates shared_ptr-like behavior. More... | |
void | reset () |
Emulates shared_ptr-like behavior. More... | |
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 | ( | ) |
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 |
|
static |
void cinder::gl::GlslProg::bind | ( | ) | const |
|
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 |
|
protected |
|
protected |
cinder::gl::GlslProg::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
void cinder::gl::GlslProg::reset | ( | ) |
Emulates shared_ptr-like behavior.
|
protected |