diff options
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) |