fixed: auto_ptr -> unique_ptr
[opensg.git] / Tools / osgBench / q3.py
blobfc6237f5048cb3fa0b410e777862d2b98a8e7f3d
1 from osgbench import *
2 t=TestWindow()
3 t.setSize(300,300)
4 t.open()
6 test=Test()
7 test.setWindow(t)
8 test.setHeadlight(1)
9 test.setNFrames(100)
11 nc=1
13 images = []
15 for res in (1,2,4,8,16):
16 scene=Group()
17 for i in range(-nc,nc):
18 for j in range(-nc,nc):
19 geo=makeBox(.8,.8,.8,res,res,res)
20 geo.setDlistCache(0)
21 geo.translate(i*2, j*2, 0)
22 scene.addChild(geo)
23 addRef(scene)
25 test=Test()
26 test.setWindow(t)
27 test.setScene(scene)
28 test.setHeadlight(1)
29 test.setNFrames(100)
31 test.clear()
32 test.addFov(90)
33 test.makeOrbit(0,1,0)
35 print "%d res" % res
36 test.run()
38 images = images + [test.snapshot(25+res)]
40 diff = images[0].clone()
41 diff.diff(images[3])
42 diff.write("difftest.png")
43 images[0].write("difftest2.png")