Changed the Viewer::realize() calls across to not using the threading paramter
leaving it up to the Viewer to specify the mode (which by default is MultiThreaded). Added a check for the presence of osgParticle systems so that threading is disabled in this case.
This commit is contained in:
@@ -242,7 +242,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootNode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -187,7 +187,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -187,7 +187,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ class CameraPacket {
|
||||
void getModelView(osg::Matrix& matrix,float angle_offset=0.0f)
|
||||
{
|
||||
|
||||
matrix = _matrix * osg::Matrix::rotate(angle_offset,0.0f,1.0f,1.0f);
|
||||
matrix = _matrix * osg::Matrix::rotate(angle_offset,0.0f,1.0f,0.0f);
|
||||
}
|
||||
|
||||
void checkByteOrder( void )
|
||||
@@ -164,7 +164,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootnode.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
// objects for managing the broadcasting and recieving of camera packets.
|
||||
Broadcaster bc;
|
||||
|
||||
@@ -231,7 +231,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -171,7 +171,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -688,7 +688,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( root );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( rootnode );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -164,7 +164,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(group.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -319,7 +319,7 @@ int main( int argc, char **argv )
|
||||
// register trackball, flight and drive.
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -423,7 +423,7 @@ int main( int argc, char **argv )
|
||||
//osgDB::writeNodeFile(*keyboardModel->getScene(),"test.osg");
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
|
||||
while( !viewer.done() )
|
||||
|
||||
@@ -347,7 +347,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
// set all the sceneview's up so that their left and right add cull masks are set up.
|
||||
for(osgProducer::OsgCameraGroup::SceneHandlerList::iterator itr=viewer.getSceneHandlerList().begin();
|
||||
|
||||
@@ -159,7 +159,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( rootnode );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -445,7 +445,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( node );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( rootnode );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -346,7 +346,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
if (manuallyCreateOccluders)
|
||||
{
|
||||
|
||||
@@ -385,7 +385,7 @@ int main(int argc, char **argv)
|
||||
viewer.setSceneData(root);
|
||||
|
||||
// create the windows and run the threads.
|
||||
// viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
// viewer.realize();
|
||||
// run single threaded since osgParticle still writes during cull.
|
||||
viewer.realize(Producer::CameraGroup::SingleThreaded);
|
||||
|
||||
|
||||
@@ -647,7 +647,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootNode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
g_pPixelBuffer = new PBuffer(512,512);
|
||||
g_pPixelBuffer->initialize();
|
||||
|
||||
@@ -430,7 +430,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -393,7 +393,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootNode.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( rootnode );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -185,7 +185,7 @@ int main( int argc, char **argv )
|
||||
viewer.getEventHandlerList().push_front(new MyEventHandler(&seq));
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -215,7 +215,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( model );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( node );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -471,7 +471,7 @@ int main( int argc, char **argv )
|
||||
if (ds) ds->setStereo(true);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
// now the windows have been realized we switch off the cursor to prevent it
|
||||
// distracting the people seeing the stereo images.
|
||||
|
||||
@@ -352,7 +352,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( createTeapot() );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -516,7 +516,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(rootNode.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -201,7 +201,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( loadedModel );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -723,7 +723,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData( rootNode );
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -263,7 +263,7 @@ int main( int argc, char **argv )
|
||||
viewer.setRealizeCallback(new ConstructStateCallback(rootNode));
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -402,7 +402,7 @@ int main(int argc, char *argv[])
|
||||
viewer.setSceneData(rootnode);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(loadedModel.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
@@ -109,8 +109,7 @@ int main( int argc, char **argv )
|
||||
viewer.setSceneData(loadedModel.get());
|
||||
|
||||
// create the windows and run the threads.
|
||||
// viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
viewer.realize(Producer::CameraGroup::SingleThreaded);
|
||||
viewer.realize();
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user