summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorrgraef <romangraef@gmail.com>2021-04-21 14:16:09 +0200
committerrgraef <romangraef@gmail.com>2021-04-21 14:16:09 +0200
commitbcb0973e979968d0a07eb7c826df0889ed7c3979 (patch)
treed1778733d2051f8dae60815f52811a0f81fa4ba0 /main.py
downloadtxtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.tar.gz
txtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.tar.bz2
txtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.zip
Initial commit
Diffstat (limited to 'main.py')
-rw-r--r--main.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..c33a120
--- /dev/null
+++ b/main.py
@@ -0,0 +1,35 @@
+import glfw
+from vulkan import *
+from glfw.GLFW import *
+
+from txtgameengine.app import TxtGameApp
+
+
+def main():
+ glfw.init()
+ glfw.window_hint(GLFW_CLIENT_API, GLFW_NO_API)
+ window = glfw.create_window(640, 480, "Vulkan window", None, None)
+ if not window:
+ glfw.terminate()
+ return
+ extensions = vkEnumerateInstanceExtensionProperties(None)
+ print([e.name for e in extensions])
+ while not glfw.window_should_close(window):
+ glfw.poll_events()
+ glfw.destroy_window(window)
+ glfw.terminate()
+
+
+class TestApp(TxtGameApp):
+ def __init__(self):
+ super().__init__((640, 480), "Vulkan window")
+ self.requested_validation_layers += ["VK_LAYER_KHRONOS_validation"]
+
+ def update(self, delta: float):
+ pass
+
+
+if __name__ == '__main__':
+ # main()
+ a = TestApp()
+ a.start()