Tweak API and updated wrappers to get wrappers to build
This commit is contained in:
parent
ebd68ba063
commit
cfe737c552
@ -165,6 +165,13 @@ int main(int argc, char** argv)
|
||||
// add the stats handler
|
||||
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||
|
||||
|
||||
unsigned int screenNum;
|
||||
while (arguments.read("--screen",screenNum))
|
||||
{
|
||||
viewer.setUpViewOnSingleScreen(screenNum);
|
||||
}
|
||||
|
||||
// load the data
|
||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
||||
if (!loadedModel)
|
||||
|
@ -299,11 +299,16 @@ configure reflector "osgDB::ReadWriteMutex"
|
||||
object-type
|
||||
end
|
||||
|
||||
|
||||
configure reflector "osg::DeleteHandler"
|
||||
object-type
|
||||
end
|
||||
|
||||
configure reflector "osg::GraphicsContext"
|
||||
object-type
|
||||
end
|
||||
|
||||
suppress reflector "OpenThreads::Mutex"
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Doxygen doesn't parse ReadFunc and WriteFunc correctly...
|
||||
|
@ -182,7 +182,7 @@ class OSG_EXPORT GraphicsContext : public Object
|
||||
OperationQueue& getOperationsQueue() { return _operations; }
|
||||
|
||||
/** Get the operations queue mutex.*/
|
||||
OpenThreads::Mutex& getOperationsMutex() { return _operationsMutex; }
|
||||
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(); }
|
||||
|
@ -213,8 +213,6 @@ void OperationsThread::removeAllOperations()
|
||||
|
||||
void OperationsThread::run()
|
||||
{
|
||||
bool contextRealizedInThisThread = false;
|
||||
|
||||
// make the graphics context current.
|
||||
GraphicsContext* graphicsContext = dynamic_cast<GraphicsContext*>(_parent.get());
|
||||
if (graphicsContext)
|
||||
|
@ -728,7 +728,7 @@ void Viewer::stopThreading()
|
||||
{
|
||||
osg::GraphicsContext* gc = (*citr);
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() );
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) );
|
||||
osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue();
|
||||
for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin();
|
||||
oitr != operations.end();
|
||||
@ -758,7 +758,7 @@ void Viewer::stopThreading()
|
||||
{
|
||||
osg::GraphicsContext* gc = (*citr);
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() );
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) );
|
||||
osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue();
|
||||
for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin();
|
||||
oitr != operations.end();
|
||||
@ -915,7 +915,7 @@ void Viewer::startThreading()
|
||||
{
|
||||
osg::GraphicsContext* gc = (*citr);
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() );
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) );
|
||||
osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue();
|
||||
for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin();
|
||||
oitr != operations.end();
|
||||
@ -1731,7 +1731,7 @@ void Viewer::renderingTraversals()
|
||||
{
|
||||
osg::GraphicsContext* gc = (*itr);
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( gc->getOperationsMutex() );
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( *(gc->getOperationsMutex()) );
|
||||
osg::GraphicsContext::OperationQueue& operations = gc->getOperationsQueue();
|
||||
for(osg::GraphicsContext::OperationQueue::iterator oitr = operations.begin();
|
||||
oitr != operations.end();
|
||||
|
@ -29,7 +29,7 @@ TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osg::Operation > >, osg::GraphicsContex
|
||||
|
||||
TYPE_NAME_ALIAS(std::list< osg::Camera * >, osg::GraphicsContext::Cameras);
|
||||
|
||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
I_BaseType(osg::Object);
|
||||
I_Method1(void, add, IN, osg::Operation *, operation,
|
||||
__void__add__Operation_P1,
|
||||
@ -55,8 +55,8 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
__OperationQueue_R1__getOperationsQueue,
|
||||
"Get the operations queue, not you must use the OperationsMutex when accessing the queue. ",
|
||||
"");
|
||||
I_Method0(OpenThreads::Mutex &, getOperationsMutex,
|
||||
__OpenThreads_Mutex_R1__getOperationsMutex,
|
||||
I_Method0(OpenThreads::Mutex *, getOperationsMutex,
|
||||
__OpenThreads_Mutex_P1__getOperationsMutex,
|
||||
"Get the operations queue mutex. ",
|
||||
"");
|
||||
I_Method0(osg::Block *, getOperationsBlock,
|
||||
@ -261,8 +261,8 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
I_SimpleProperty(osg::Block *, OperationsBlock,
|
||||
__osg_Block_P1__getOperationsBlock,
|
||||
0);
|
||||
I_SimpleProperty(OpenThreads::Mutex &, OperationsMutex,
|
||||
__OpenThreads_Mutex_R1__getOperationsMutex,
|
||||
I_SimpleProperty(OpenThreads::Mutex *, OperationsMutex,
|
||||
__OpenThreads_Mutex_P1__getOperationsMutex,
|
||||
0);
|
||||
I_SimpleProperty(osg::GraphicsContext::OperationQueue &, OperationsQueue,
|
||||
__OperationQueue_R1__getOperationsQueue,
|
||||
|
Loading…
Reference in New Issue
Block a user