Commits

rkruppe  committed edbf748

Re-add a minimal executable (derived from ttgx/demo.py) to xfish

  • Participants
  • Parent commits d7da6fd

Comments (0)

Files changed (1)

File xfish/main.py

+import pyglet
+from pyglet.gl import *
+import ttgx.process
+
+def main():
+    proc = ttgx.process.Process()
+    proc.create_universe()
+    proc.create_window(width=800, height=600)
+    glEnable(GL_BLEND)
+    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+    #TODO fix our timestep
+    pyglet.clock.schedule_interval(lambda _: proc.universe.step(), 0.1)
+    pyglet.app.run()
+
+if __name__ == '__main__':
+    main()
+