Changeset 13041 for OpenSceneGraph/trunk/src/osg/GraphicsThread.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/GraphicsThread.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/GraphicsThread.cpp
r11909 r13041 23 23 GraphicsThread::GraphicsThread() 24 24 { 25 } 25 } 26 26 27 27 void GraphicsThread::run() … … 30 30 GraphicsContext* graphicsContext = dynamic_cast<GraphicsContext*>(_parent.get()); 31 31 if (graphicsContext) 32 { 32 { 33 33 graphicsContext->makeCurrent(); 34 34 35 35 graphicsContext->getState()->initializeExtensionProcs(); 36 36 } … … 39 39 40 40 // release operations before the thread stops working. 41 _operationQueue->releaseAllOperations(); 41 _operationQueue->releaseAllOperations(); 42 42 43 43 if (graphicsContext) 44 { 44 { 45 45 graphicsContext->releaseContext(); 46 46 } … … 53 53 if (context) operator() (context); 54 54 } 55 55 56 56 void SwapBuffersOperation::operator () (GraphicsContext* context) 57 57 { … … 72 72 else if (_preBlockOp==GL_FINISH) glFinish(); 73 73 } 74 74 75 75 block(); 76 76 } … … 86 86 // release the graphics context. 87 87 context->releaseContext(); 88 89 // reset the block so that it the next call to block() 88 89 // reset the block so that it the next call to block() 90 90 reset(); 91 91 92 92 // block this thread, until the block is released externally. 93 93 block(); 94 94 95 95 // re acquire the graphics context. 96 96 context->makeCurrent();
