1 # Simple OpenSG benchmark
4 # Define the Window's parameters
14 for i
in range(-nc
,nc
):
15 for j
in range(-nc
,nc
):
16 for k
in range(-nc
,nc
):
19 trans
.setTranslation(i
*2, j
*2, k
*2)
20 geo
=makeBox(1,1,1, 1,1,1)
23 scene
.addChild(makeBox(1,1,1, 1,1,1))
36 print "%d transformed cubes took %f seconds: %f fps" % ((nc
*2)*(nc
*2)*(nc
*2), test
.getTime(), test
.getFPS())
42 for i
in range(-nc
,nc
):
43 for j
in range(-nc
,nc
):
44 for k
in range(-nc
,nc
):
45 geo
=makeBox(1,1,1, 1,1,1)
46 geo
.translate(i
*2, j
*2, k
*2)
49 scene
.addChild(makeBox(1,1,1, 1,1,1))
54 print "%d cubes took %f seconds: %f fps" % ((nc
*2)*(nc
*2)*(nc
*2), test
.getTime(), test
.getFPS())
58 scene
=makeBox(1,1,1, 1,1,1)
60 for i
in range(-nc
,nc
):
61 for j
in range(-nc
,nc
):
62 for k
in range(-nc
,nc
):
63 geo
=makeBox(1,1,1, 1,1,1)
64 geo
.translate(i
*2, j
*2, k
*2)
70 print "%d merged cubes took %f seconds: %f fps" % ((nc
*2)*(nc
*2)*(nc
*2), test
.getTime(), test
.getFPS())