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