repo.or.cz
/
opensg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixed: auto_ptr -> unique_ptr
[opensg.git]
/
Tools
/
osgBench
/
q.py
blob
5a935ff53a4745b6cd11573de8f907a762a81de4
1
from
osgbench
import
*
2
t
=
TestWindow
()
3
t
.
setSize
(
300
,
300
)
4
t
.
open
()
5
6
test
=
Test
()
7
test
.
setWindow
(
t
)
8
test
.
setHeadlight
(
1
)
9
test
.
setNFrames
(
100
)
10
11
nc
=
1
12
13
for
res
in
(
1
,
2
,
4
,
8
,
16
,
32
,
64
,
128
,
256
,
512
):
14
scene
=
Group
()
15
for
i
in
range
(-
nc
,
nc
):
16
for
j
in
range
(-
nc
,
nc
):
17
geo
=
makeBox
(
.8
,
.8
,
.8
,
res
,
res
,
res
)
18
geo
.
setDlistCache
(
0
)
19
geo
.
translate
(
i
*
2
,
j
*
2
,
0
)
20
scene
.
addChild
(
geo
)
21
addRef
(
scene
)
22
23
test
=
Test
()
24
test
.
setWindow
(
t
)
25
test
.
setScene
(
scene
)
26
test
.
setHeadlight
(
1
)
27
test
.
setNFrames
(
100
)
28
29
test
.
clear
()
30
test
.
addFov
(
90
)
31
test
.
makeOrbit
(
0
,
1
,
0
)
32
33
print
"
%d
res"
%
res
34
test
.
run
()