diff options
author | rom <romangraef@gmail.com> | 2021-04-24 02:43:02 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-24 02:43:02 +0200 |
commit | 16816aa5187b1c439da71f4badfbe8afdb5ec435 (patch) | |
tree | ff4466c72fcc079deefe77609989f4be7e3f72a6 /txtgameengine/__main__.py | |
parent | a3998a8e8b507cf2915e81ab6fbb05efef29eb65 (diff) | |
download | txtgameengine-16816aa5187b1c439da71f4badfbe8afdb5ec435.tar.gz txtgameengine-16816aa5187b1c439da71f4badfbe8afdb5ec435.tar.bz2 txtgameengine-16816aa5187b1c439da71f4badfbe8afdb5ec435.zip |
pushing stuff around
Diffstat (limited to 'txtgameengine/__main__.py')
-rw-r--r-- | txtgameengine/__main__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/txtgameengine/__main__.py b/txtgameengine/__main__.py index edfbd29..a56571e 100644 --- a/txtgameengine/__main__.py +++ b/txtgameengine/__main__.py @@ -3,7 +3,7 @@ import numpy as np from .scenes import SceneTxtGameApp, Scene from pathlib import Path from .shaders import TextureShader -from .twod.textures import Texture +from .twod.textures import Texture, TEXTURE_FOLDER shader_path = Path(__file__).parent / 'shaders' @@ -47,7 +47,7 @@ class EvilTriangleScene(TriangleScene): class TextureScene(Scene): def on_enter(self): self.texture_shaders = TextureShader(self.app) - self.texture = Texture(self.app, 'test_image.png') + self.texture = Texture(self.app, TEXTURE_FOLDER / 'test_image.png') self.triangle = self.app.render.setup_buffer( np.array([ -1.0, 1.0, @@ -62,6 +62,8 @@ class TextureScene(Scene): ], np.float32)) def update(self, delta: float): + print(self.app.coords.from_pixels_to_screen(0, 0)) + print(self.app.coords.from_screen_to_pixels(0, 0)) with self.texture_shaders: self.app.render.textured_triangle(self.texture_shaders.textureSampler, self.texture, self.triangle, self.uvs) |