osg::GraphicsThread Class Reference

Inheritance diagram for osg::GraphicsThread:

osg::Referenced List of all members.

Public Member Functions

 GraphicsThread ()
void add (Operation *operation, bool waitForCompletion=false)
void remove (Operation *operation)
void remove (const std::string &name)
void removeAllOperations ()
osg::ref_ptr< OperationgetCurrentOperation ()
virtual void run ()
void setDone (bool done)
bool getDone () const
virtual int cancel ()

Protected Types

typedef std::list< ref_ptr<
Operation > > 
OperationQueue

Protected Member Functions

virtual ~GraphicsThread ()

Protected Attributes

GraphicsContext_graphicsContext
bool _done
OpenThreads::Mutex _operationsMutex
osg::ref_ptr< osg::Block_operationsBlock
OperationQueue _operations
osg::ref_ptr< Operation_currentOperation

Friends

class GraphicsContext

Classes

struct  Operation

Detailed Description

GraphicsThread is a helper class for running OpenGL GraphicsOperation within a single thread assigned to a specific GraphicsContext.


Member Typedef Documentation

typedef std::list< ref_ptr<Operation> > osg::GraphicsThread::OperationQueue [protected]
 


Constructor & Destructor Documentation

osg::GraphicsThread::GraphicsThread  ) 
 

virtual osg::GraphicsThread::~GraphicsThread  )  [protected, virtual]
 


Member Function Documentation

void osg::GraphicsThread::add Operation operation,
bool  waitForCompletion = false
 

Add operation to end of OperationQueue, this will be executed by the graphics thread once this operation gets to the head of the queue.

virtual int osg::GraphicsThread::cancel  )  [virtual]
 

Cancel this graphics thread.

osg::ref_ptr<Operation> osg::GraphicsThread::getCurrentOperation  )  [inline]
 

Get the operation currently being run.

bool osg::GraphicsThread::getDone  )  const [inline]
 

void osg::GraphicsThread::remove const std::string &  name  ) 
 

Remove named operation from OperationQueue.

void osg::GraphicsThread::remove Operation operation  ) 
 

Remove operation from OperationQueue.

void osg::GraphicsThread::removeAllOperations  ) 
 

Remove all operations from OperationQueue.

virtual void osg::GraphicsThread::run  )  [virtual]
 

Run does the graphics thread run loop.

void osg::GraphicsThread::setDone bool  done  ) 
 


Friends And Related Function Documentation

friend class GraphicsContext [friend]
 


Member Data Documentation

osg::ref_ptr<Operation> osg::GraphicsThread::_currentOperation [protected]
 

bool osg::GraphicsThread::_done [protected]
 

GraphicsContext* osg::GraphicsThread::_graphicsContext [protected]
 

OperationQueue osg::GraphicsThread::_operations [protected]
 

osg::ref_ptr<osg::Block> osg::GraphicsThread::_operationsBlock [protected]
 

OpenThreads::Mutex osg::GraphicsThread::_operationsMutex [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 06:19:17 2006 for OpenSceneGraph by  doxygen 1.4.6