From 16816aa5187b1c439da71f4badfbe8afdb5ec435 Mon Sep 17 00:00:00 2001 From: rom Date: Sat, 24 Apr 2021 02:43:02 +0200 Subject: pushing stuff around --- txtgameengine/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'txtgameengine/__main__.py') 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) -- cgit