osg::Program::Program::PerContextProgram Class Reference

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

Inheritance diagram for osg::Program::Program::PerContextProgram:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 PerContextProgram (const Program *program, unsigned int contextID)
GLuint getHandle () const
void requestLink ()
void linkProgram ()
bool 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 ActiveVarInfoMapgetActiveUniforms () const
const ActiveVarInfoMapgetActiveAttribs () const
GLint getUniformLocation (const std::string &name) const
GLint getAttribLocation (const std::string &name) const
void addShaderToAttach (Shader *shader)
void addShaderToDetach (Shader *shader)

Protected Types

typedef std::pair
< osg::ref_ptr< const
osg::Uniform >, unsigned int > 
UniformModifiedCountPair
typedef std::vector
< UniformModifiedCountPair
LastAppliedUniformList
typedef std::vector< ref_ptr
< Shader > > 
ShaderList

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
ActiveVarInfoMap _uniformInfoMap
ActiveVarInfoMap _attribInfoMap
LastAppliedUniformList _lastAppliedUniformList
ShaderList _shadersToDetach
ShaderList _shadersToAttach


Detailed Description

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


Member Typedef Documentation

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

typedef std::vector< ref_ptr<Shader> > osg::Program::Program::PerContextProgram::ShaderList [protected]

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


Constructor & Destructor Documentation

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

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


Member Function Documentation

void osg::Program::Program::PerContextProgram::addShaderToAttach ( Shader shader  )  [inline]

void osg::Program::Program::PerContextProgram::addShaderToDetach ( Shader shader  )  [inline]

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

const ActiveVarInfoMap& osg::Program::Program::PerContextProgram::getActiveAttribs (  )  const [inline]

const ActiveVarInfoMap& osg::Program::Program::PerContextProgram::getActiveUniforms (  )  const [inline]

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

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

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

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

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

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

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

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

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

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

bool osg::Program::Program::PerContextProgram::validateProgram (  ) 


Member Data Documentation

ActiveVarInfoMap osg::Program::Program::PerContextProgram::_attribInfoMap [protected]

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

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

Pointer to this context's extension functions.

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

Handle to the actual OpenGL glProgram.

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

Is our glProgram successfully linked?

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

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

Does our glProgram need to be linked?

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

Pointer to our parent Program.

ShaderList osg::Program::Program::PerContextProgram::_shadersToAttach [protected]

ShaderList osg::Program::Program::PerContextProgram::_shadersToDetach [protected]

ActiveVarInfoMap osg::Program::Program::PerContextProgram::_uniformInfoMap [protected]


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

osg logo
Generated at Thu Mar 19 23:36:03 2009 for the OpenSceneGraph by doxygen 1.5.8.