fixed: compile issue
[opensg.git] / Tools / osgBench / run.py
blob778f2cd03098ca0b2687215e44140ca445f692d4
1 import sys
2 from osgbench import *
4 def usage():
5 print "usage."
6 return -1
8 def main(argv=sys.argv):
9 if len(argv) != 2:
10 return usage()
12 filename = argv[1]
14 print "Loading %s..." % filename,
15 scene = loadScene(filename)
16 print "done"
18 g = createGraphOp("GeoType")
19 g.traverse(scene)
21 win = TestWindow()
22 win.open()
24 test = Test()
25 test.setWindow(win)
26 test.setScene(scene)
27 test.setNFrames(1000)
29 test.clear()
30 test.addFov(42)
31 test.makeOrbit(0, 1, 0)
33 test.run()
35 print "FPS:", test.getFPS()
36 win.close()
38 if __name__ == '__main__':
39 sys.exit(main() or 0)