Added a viewer.sync to the end of all the demos.
Removed the Win32 remapping of keycodes from the osgProducer::EventAdapter.
This commit is contained in:
@@ -257,6 +257,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -220,5 +220,8 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -196,6 +196,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -196,6 +196,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
// if we are master clean up by telling all slaves that we're going down.
|
||||
if (viewerMode==MASTER)
|
||||
|
||||
@@ -240,6 +240,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,9 @@ int main(int argc, char *argv[])
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,6 +180,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -703,6 +703,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -162,6 +162,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -181,5 +181,8 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
#include "TestManipulator.h"
|
||||
|
||||
@@ -327,8 +327,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
//viewer.sync();
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -371,6 +371,9 @@ int main( int argc, char **argv )
|
||||
|
||||
// fire off the cull and draw traversals of the scene.
|
||||
viewer.frame();
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -184,6 +184,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -460,6 +460,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
//viewer.sync();
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,9 @@ int main(int argc, char **argv)
|
||||
viewer.setSceneData(root);
|
||||
|
||||
// create the windows and run the threads.
|
||||
viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
// viewer.realize(Producer::CameraGroup::ThreadPerCamera);
|
||||
// run single threaded since osgParticle still writes during cull.
|
||||
viewer.realize(Producer::CameraGroup::SingleThreaded);
|
||||
|
||||
while( !viewer.done() )
|
||||
{
|
||||
@@ -400,6 +402,9 @@ int main(int argc, char **argv)
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#include <osg/Billboard>
|
||||
#include <osg/Material>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgUtil/TransformCallback>
|
||||
#include <osgUtil/SmoothingVisitor>
|
||||
|
||||
@@ -663,6 +659,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
delete g_pPixelBuffer;
|
||||
|
||||
|
||||
@@ -439,6 +439,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -403,6 +403,9 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
#include <osgUtil/Optimizer>
|
||||
@@ -124,6 +120,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
|
||||
@@ -196,6 +194,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11,11 +11,6 @@
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
|
||||
@@ -235,6 +230,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include <osg/Material>
|
||||
#include <osg/Texture2D>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
@@ -138,6 +136,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -467,6 +467,9 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
|
||||
#include <osgProducer/Viewer>
|
||||
|
||||
|
||||
@@ -369,6 +367,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -534,6 +534,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
#include <osg/TexGen>
|
||||
#include <osg/Material>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
@@ -214,6 +210,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
#include <osg/DrawPixels>
|
||||
#include <osg/Geode>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
@@ -454,6 +450,9 @@ int main( int argc, char **argv )
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
#include <osg/TexGen>
|
||||
#include <osg/Geode>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
#include <osgGA/FlightManipulator>
|
||||
#include <osgGA/DriveManipulator>
|
||||
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
@@ -283,6 +279,9 @@ int main( int argc, char **argv )
|
||||
|
||||
}
|
||||
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <osgDB/Registry>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
|
||||
#include <osgUtil/SmoothingVisitor>
|
||||
#include <osgUtil/Optimizer>
|
||||
|
||||
@@ -419,6 +417,9 @@ int main(int argc, char *argv[])
|
||||
viewer.frame();
|
||||
|
||||
}
|
||||
|
||||
// wait for all cull and draw threads to complete before exit.
|
||||
viewer.sync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user