Further work on new threading model.
This commit is contained in:
@@ -176,6 +176,21 @@ class OSG_EXPORT GraphicsContext : public Referenced
|
||||
/** Run the operations. */
|
||||
void runOperations();
|
||||
|
||||
typedef std::list< ref_ptr<GraphicsOperation> > OperationQueue;
|
||||
|
||||
/** Get the operations queue, not you must use the OperationsMutex when accessing the queue.*/
|
||||
OperationQueue& getOperationsQueue() { return _operations; }
|
||||
|
||||
/** Get the operations queue mutex.*/
|
||||
OpenThreads::Mutex& getOperationsMutex() { return _operationsMutex; }
|
||||
|
||||
/** Get the operations queue block used to mark an empty queue, if you end items into the empty queu you must release this block.*/
|
||||
osg::Block* getOperationsBlock() { return _operationsBlock.get(); }
|
||||
|
||||
/** Get the current operations that is being run.*/
|
||||
GraphicsOperation* getCurrentOperation() { return _currentOperation.get(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/** Get the traits of the GraphicsContext.*/
|
||||
@@ -354,8 +369,6 @@ class OSG_EXPORT GraphicsContext : public Referenced
|
||||
|
||||
OpenThreads::Thread* _threadOfLastMakeCurrent;
|
||||
|
||||
typedef std::list< ref_ptr<GraphicsOperation> > OperationQueue;
|
||||
|
||||
OpenThreads::Mutex _operationsMutex;
|
||||
osg::ref_ptr<osg::Block> _operationsBlock;
|
||||
OperationQueue _operations;
|
||||
|
||||
Reference in New Issue
Block a user