32 lines
631 B
Python
Executable File
32 lines
631 B
Python
Executable File
#!/usr/bin/env pythonw
|
|
|
|
import sys
|
|
import os
|
|
from PySFML import sf
|
|
from wfobj import WFObj
|
|
import getopt
|
|
|
|
def main(argv):
|
|
options, args = getopt.getopt(argv[1:], '')
|
|
if len(args) == 0:
|
|
sys.stderr.write('Specify object file to load\n')
|
|
return 2
|
|
|
|
obj = WFObj(args[0])
|
|
|
|
window = sf.Window(sf.VideoMode(800, 600, 32),
|
|
'Python Wavefront Object Viewer')
|
|
|
|
while window.IsOpened():
|
|
event = sf.Event()
|
|
|
|
while window.GetEvent(event):
|
|
if event.Type == sf.Event.Closed:
|
|
window.Close()
|
|
|
|
window.Display()
|
|
|
|
return 0
|
|
|
|
sys.exit(main(sys.argv))
|