Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# osg::Program::PerContextProgram Class Reference

PerContextProgram (PCP) is an OSG-internal encapsulation of glPrograms per-GL context. More...

Inheritance diagram for osg::Program::PerContextProgram:

[legend]
List of all members.

## Public Member Functions
| PerContextProgram (const Program *program, unsigned int contextID)
GLuint | getHandle () const
void | requestLink ()
void | linkProgram ()
void | validateProgram ()
bool | needsLink () const
bool | isLinked () const
bool | getInfoLog (std::string &infoLog) const
void | useProgram () const
void | resetAppliedUniforms () const
void | apply (const Uniform &uniform) const
const NameInfoMap & | getActiveUniforms () const
const NameInfoMap & | getActiveAttribs () const
GLint | getUniformLocation (const std::string &name) const
GLint | getAttribLocation (const std::string &name) const
## Protected Types
typedef std::pair< const osg::Uniform *, unsigned int > | UniformModifiedCountPair
typedef std::vector< UniformModifiedCountPair > | LastAppliedUniformList
## Protected Member Functions
| ~PerContextProgram ()
## Protected Attributes
const Program * | _program
| Pointer to our parent Program.
osg::ref_ptr< GL2Extensions > | _extensions
| Pointer to this context's extension functions.
GLuint | _glProgramHandle
| Handle to the actual OpenGL glProgram.
bool | _needsLink
| Does our glProgram need to be linked?
bool | _isLinked
| Is our glProgram successfully linked?
const unsigned int | _contextID
NameInfoMap | _uniformInfoMap
NameInfoMap | _attribInfoMap
LastAppliedUniformList | _lastAppliedUniformList

## Detailed Description

PerContextProgram (PCP) is an OSG-internal encapsulation of glPrograms per-GL context.

## Member Typedef Documentation

typedef std::vector<UniformModifiedCountPair> osg::Program::PerContextProgram::LastAppliedUniformList`[protected]`

typedef std::pair<const osg::Uniform*, unsigned int> osg::Program::PerContextProgram::UniformModifiedCountPair`[protected]`

## Constructor & Destructor Documentation

osg::Program::PerContextProgram::PerContextProgram | ( | const Program * | program,
|  | unsigned int | contextID
| ) |

osg::Program::PerContextProgram::~PerContextProgram | ( |  | ) | `[protected]`

## Member Function Documentation

void osg::Program::PerContextProgram::apply | ( | const Uniform & | uniform | ) | const`[inline]`

const NameInfoMap& osg::Program::PerContextProgram::getActiveAttribs | ( |  | ) | const`[inline]`

const NameInfoMap& osg::Program::PerContextProgram::getActiveUniforms | ( |  | ) | const`[inline]`

GLint osg::Program::PerContextProgram::getAttribLocation | ( | const std::string & | name | ) | const`[inline]`

GLuint osg::Program::PerContextProgram::getHandle | ( |  | ) | const`[inline]`

bool osg::Program::PerContextProgram::getInfoLog | ( | std::string & | infoLog | ) | const

GLint osg::Program::PerContextProgram::getUniformLocation | ( | const std::string & | name | ) | const`[inline]`

bool osg::Program::PerContextProgram::isLinked | ( |  | ) | const`[inline]`

void osg::Program::PerContextProgram::linkProgram | ( |  | ) |

bool osg::Program::PerContextProgram::needsLink | ( |  | ) | const`[inline]`

void osg::Program::PerContextProgram::requestLink | ( |  | ) |

void osg::Program::PerContextProgram::resetAppliedUniforms | ( |  | ) | const`[inline]`

void osg::Program::PerContextProgram::useProgram | ( |  | ) | const

void osg::Program::PerContextProgram::validateProgram | ( |  | ) |

## Member Data Documentation

NameInfoMap osg::Program::PerContextProgram::_attribInfoMap`[protected]`

const unsigned int osg::Program::PerContextProgram::_contextID`[protected]`

osg::ref_ptr<GL2Extensions> osg::Program::PerContextProgram::_extensions`[protected]`

| Pointer to this context's extension functions.

GLuint osg::Program::PerContextProgram::_glProgramHandle`[protected]`

| Handle to the actual OpenGL glProgram.

bool osg::Program::PerContextProgram::_isLinked`[protected]`

| Is our glProgram successfully linked?

LastAppliedUniformList osg::Program::PerContextProgram::_lastAppliedUniformList`[mutable, protected]`

bool osg::Program::PerContextProgram::_needsLink`[protected]`

| Does our glProgram need to be linked?

const Program* osg::Program::PerContextProgram::_program`[protected]`

| Pointer to our parent Program.

NameInfoMap osg::Program::PerContextProgram::_uniformInfoMap`[protected]`

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

- Program