osg::Program::PerContextProgram Class Reference

Inheritance diagram for osg::Program::PerContextProgram:

osg::Referenced

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< 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
osg::ref_ptr< GL2Extensions_extensions
GLuint _glProgramHandle
bool _needsLink
bool _isLinked
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::pair<const osg::Uniform*, unsigned int> osg::Program::PerContextProgram::UniformModifiedCountPair [protected]

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


Constructor & Destructor Documentation

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

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


Member Function Documentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Member Data Documentation

Pointer to our parent Program

Pointer to this context's extension functions

Handle to the actual OpenGL glProgram

Does our glProgram need to be linked?

Is our glProgram successfully linked?

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


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

Generated on Wed Aug 13 17:03:34 2008 for openscenegraph by  doxygen 1.5.6