def main(): sounds.init() op = OptionParser("usage: %prog [options]") add = op.add_option add("--size",default="1024,768", help="Size of screen [ %default ]") add("-f","--fullscreen",default=False,action="store_true", help="full screen") add("--fps",default=60,type="int", help="Maximum fps [ %default ]") add("--time",default=False,action="store_true", help="Show timings (inluding actual fps)") add("--test-level",default=None,type="int") global options options,args = op.parse_args() pyglet.clock.set_fps_limit(options.fps) if options.fullscreen: width = height = None else: width,height = [int(c) for c in options.size.split(",")] import tdgl.material tdgl.material.load("materials.mtl") from gamewindow import GameWindow win = GameWindow(width=width,height=height, fullscreen=options.fullscreen) tdgl_usual_setup() pyglet.app.run()
def main(): pyglet.clock.set_fps_limit(60) win = GameWin(width=1024,height=768) tdgl_usual_setup() pyglet.app.run()
def main(): pyglet.clock.set_fps_limit(60) win = GameWin(width=1024, height=768) tdgl_usual_setup() pyglet.app.run()