fixed: Windows removed context when exiting from a passive window (thanks to M. Raab...
[opensg.git] / Tools / osgBench / compActTrav.py
blob94c71ba4700dc574ec5eccd4f0f18d718b86e7c5
1 # Simple OpenSG Benchmark
2 from osgbench import *
3 from sys import argv
5 # Load the scene
6 print "Loading " + argv[1] + "..."
7 scene=loadScene(argv[1])
9 # Define the Window's parameters
10 win=TestWindow()
11 win.setSize(900, 900)
12 win.open()
14 # Define the Test(s)
15 test=Test()
16 test.setWindow(win)
17 test.setScene(scene)
18 test.setNFrames(100)
20 test.clear()
21 test.addFov(60)
22 test.makeOrbit(0,0,1)
24 test.run()
25 print "RenderAction took %f seconds: %f fps" % (test.getTime(), test.getFPS())
27 test.useRenderTraversal(True)
28 test.run()
29 print "RenderTraversal took %f seconds: %f fps" % (test.getTime(), test.getFPS())
31 win.close()