# Cinder

# cinder::gl::GlslProg Class Reference

`#include <GlslProg.h>`

List of all members.

## Classes
struct | Obj
## Public Member Functions
| GlslProg ()
| GlslProg (DataSourceRef vertexShader, DataSourceRef fragmentShader=DataSourceRef(), DataSourceRef geometryShader=DataSourceRef())
| GlslProg (const char *vertexShader, const char *fragmentShader=0, const char *geometryShader=0)
void | bind () const
GLuint | getHandle () const
void | uniform (const std::string &name, int data)
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 Matrix44f &data, 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 void | unbind ()
## Protected Member Functions
void | loadShader (Buffer shaderSourceBuffer, GLint shaderType)
void | loadShader (const char *shaderSource, GLint shaderType)
void | attachShaders ()
void | link ()
## Protected Attributes
shared_ptr< Obj > | mObj
typedef shared_ptr< Obj > GlslProg::* | unspecified_bool_type
| Emulates shared_ptr-like behavior.
| operator unspecified_bool_type ()
| Emulates shared_ptr-like behavior.
void | reset ()
| Emulates shared_ptr-like behavior.

## Member Typedef Documentation

typedef shared_ptr<Obj> GlslProg::* cinder::gl::GlslProg::unspecified_bool_type

Emulates shared_ptr-like behavior.

## Constructor & Destructor Documentation

cinder::gl::GlslProg::GlslProg | ( |  | ) |

cinder::gl::GlslProg::GlslProg | ( | DataSourceRef | vertexShader,
|  | DataSourceRef | fragmentShader = `DataSourceRef()`,
|  | DataSourceRef | geometryShader = `DataSourceRef()` |
| ) |  |  |

cinder::gl::GlslProg::GlslProg | ( | const char * | vertexShader,
|  | const char * | fragmentShader = `0`,
|  | const char * | geometryShader = `0` |
| ) |  |  |

## Member Function Documentation

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,
|  | 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 Matrix44f & | data,
|  | 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 | ( |  | ) |

Emulates shared_ptr-like behavior.

void cinder::gl::GlslProg::reset | ( |  | ) |

Emulates shared_ptr-like behavior.

## Member Data Documentation

shared_ptr<Obj> cinder::gl::GlslProg::mObj`[protected]`

The documentation for this class was generated from the following files:

- include/cinder/gl/GlslProg.h
- src/cinder/gl/GlslProg.cpp