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:
Robert Osfield
2003-04-08 15:18:45 +00:00
parent afef5ad2fa
commit e928bca4c9
41 changed files with 105 additions and 47 deletions

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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;

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )

View File

@@ -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();

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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)
{

View File

@@ -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);

View File

@@ -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();

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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.

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{

View File

@@ -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() )
{