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

osgUtil::GLObjectsVisitor Class Reference

Inheritance diagram for osgUtil::GLObjectsVisitor:

osg::NodeVisitor osg::Referenced List of all members.

Public Types

typedef unsigned int Mode
enum  ModeValues {
  SWITCH_ON_DISPLAY_LISTS = 0x1, SWITCH_OFF_DISPLAY_LISTS = 0x2, COMPILE_DISPLAY_LISTS = 0x4, COMPILE_STATE_ATTRIBUTES = 0x8,
  RELEASE_DISPLAY_LISTS = 0x10, RELEASE_STATE_ATTRIBUTES = 0x20, SWITCH_ON_VERTEX_BUFFER_OBJECTS = 0x40, SWITCH_OFF_VERTEX_BUFFER_OBJECTS = 0x80
}

Public Member Functions

 GLObjectsVisitor (Mode mode=COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES)
void setMode (Mode mode)
Mode getMode () const
void setState (osg::State *state)
osg::StategetState ()
virtual void apply (osg::Node &node)
virtual void apply (osg::Geode &node)
void apply (osg::Drawable &drawable)
void apply (osg::StateSet &stateset)

Protected Attributes

Mode _mode
osg::ref_ptr< osg::State_state

Detailed Description

Visitor for traversing scene graph and setting each osg::Drawable's _useDisplayList flag, with option to immediately compile osg::Drawable OpenGL Display lists and osg::StateAttribute's.


Member Typedef Documentation

typedef unsigned int osgUtil::GLObjectsVisitor::Mode
 


Member Enumeration Documentation

enum osgUtil::GLObjectsVisitor::ModeValues
 

Operation modes of the.

Enumerator:
SWITCH_ON_DISPLAY_LISTS 
SWITCH_OFF_DISPLAY_LISTS 
COMPILE_DISPLAY_LISTS 
COMPILE_STATE_ATTRIBUTES 
RELEASE_DISPLAY_LISTS 
RELEASE_STATE_ATTRIBUTES 
SWITCH_ON_VERTEX_BUFFER_OBJECTS 
SWITCH_OFF_VERTEX_BUFFER_OBJECTS 


Constructor & Destructor Documentation

osgUtil::GLObjectsVisitor::GLObjectsVisitor Mode  mode = COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES  ) 
 

Construct a GLObjectsVisitor to traverse all children, operating on node according to specified mode, such as to compile or release display list/texture objects etc. Default mode is to compile GL objects.


Member Function Documentation

void osgUtil::GLObjectsVisitor::apply osg::StateSet stateset  ) 
 

void osgUtil::GLObjectsVisitor::apply osg::Drawable drawable  ) 
 

virtual void osgUtil::GLObjectsVisitor::apply osg::Geode node  )  [virtual]
 

For each Geode visited set the display list usage according to the _displayListMode.

Reimplemented from osg::NodeVisitor.

virtual void osgUtil::GLObjectsVisitor::apply osg::Node node  )  [virtual]
 

Simply traverse using standard NodeVisitor traverse method.

Reimplemented from osg::NodeVisitor.

Mode osgUtil::GLObjectsVisitor::getMode  )  const [inline]
 

Get the operational mode.

osg::State* osgUtil::GLObjectsVisitor::getState  )  [inline]
 

void osgUtil::GLObjectsVisitor::setMode Mode  mode  )  [inline]
 

Set the operational mode of what operations to do on the scene graph.

void osgUtil::GLObjectsVisitor::setState osg::State state  )  [inline]
 

Set the State to use during traversal.


Member Data Documentation

Mode osgUtil::GLObjectsVisitor::_mode [protected]
 

osg::ref_ptr<osg::State> osgUtil::GLObjectsVisitor::_state [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jun 7 04:36:14 2006 for OpenSceneGraph by  doxygen 1.4.4