VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtPerViewUniformCallback Class Reference

Callback to set a uniform value on a per-view basis. More...

Inheritance diagram for makVrv::DtPerViewUniformCallback:
Inheritance graph
[legend]

Public Member Functions

 DtPerViewUniformCallback ()
 CTOR.
 DtPerViewUniformCallback (const DtPerViewUniformCallback &, const osg::CopyOp &)
 Copy CTOR.
 META_Object (makVrv, DtPerViewUniformCallback)
virtual ~DtPerViewUniformCallback ()
 DTOR.
virtual void drawImplementation (osg::RenderInfo &renderInfo, const osg::Drawable *drawable) const
 Draw with the appropriate uniform value.
void setValue (const osg::View *v, int val)
 Set the uniform value for the specified view.
float getValue (const osg::View *v) const
 Get the uniform value for the specified view.

Protected Types

typedef std::pair< const
osg::Program::PerContextProgram
*, GLuint > 
ProgramKey
typedef std::map< ProgramKey,
GLuint > 
ProgramToUniformLoc
typedef std::map< const
osg::View *, float > 
ViewToValue

Protected Member Functions

GLuint findLocation (const osg::Program::PerContextProgram *program)
 Find the uniform's location in the program object.

Protected Attributes

ProgramToUniformLoc myProgramToUniformLoc
ViewToValue myViewToValue

Detailed Description

Callback to set a uniform value on a per-view basis.

Member Typedef Documentation

typedef std::pair<const osg::Program::PerContextProgram*, GLuint> makVrv::DtPerViewUniformCallback::ProgramKey
protected
typedef std::map<const osg::View*, float> makVrv::DtPerViewUniformCallback::ViewToValue
protected

Constructor & Destructor Documentation

makVrv::DtPerViewUniformCallback::DtPerViewUniformCallback ( )

CTOR.

makVrv::DtPerViewUniformCallback::DtPerViewUniformCallback ( const DtPerViewUniformCallback ,
const osg::CopyOp &   
)

Copy CTOR.

virtual makVrv::DtPerViewUniformCallback::~DtPerViewUniformCallback ( )
virtual

DTOR.

Member Function Documentation

makVrv::DtPerViewUniformCallback::META_Object ( makVrv  ,
DtPerViewUniformCallback   
)
virtual void makVrv::DtPerViewUniformCallback::drawImplementation ( osg::RenderInfo &  renderInfo,
const osg::Drawable *  drawable 
) const
virtual

Draw with the appropriate uniform value.

void makVrv::DtPerViewUniformCallback::setValue ( const osg::View *  v,
int  val 
)

Set the uniform value for the specified view.

float makVrv::DtPerViewUniformCallback::getValue ( const osg::View *  v) const

Get the uniform value for the specified view.

GLuint makVrv::DtPerViewUniformCallback::findLocation ( const osg::Program::PerContextProgram *  program)
protected

Find the uniform's location in the program object.

Member Data Documentation

ProgramToUniformLoc makVrv::DtPerViewUniformCallback::myProgramToUniformLoc
protected
ViewToValue makVrv::DtPerViewUniformCallback::myViewToValue
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)