diff options
author | rgraef <romangraef@gmail.com> | 2021-04-21 14:16:09 +0200 |
---|---|---|
committer | rgraef <romangraef@gmail.com> | 2021-04-21 14:16:09 +0200 |
commit | bcb0973e979968d0a07eb7c826df0889ed7c3979 (patch) | |
tree | d1778733d2051f8dae60815f52811a0f81fa4ba0 /main.py | |
download | txtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.tar.gz txtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.tar.bz2 txtgameengine-bcb0973e979968d0a07eb7c826df0889ed7c3979.zip |
Initial commit
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -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() |