From 0a22a501932e4c462fc904bcf5da541a226e4308 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 5 Nov 2021 14:45:35 +0100 Subject: Fix font being corrupt with certain sizes, fix image being corrupt if its rgb, fix window resize incorrect size --- tests/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/main.cpp') diff --git a/tests/main.cpp b/tests/main.cpp index 163aece..98fa34c 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -20,7 +20,7 @@ struct Delegate { rect.set_color({255, 0, 0, 255}); window->draw(rect); - shader_program->set_uniform("resolution", mgl::vec2f(window->get_size().x, window->get_size().y)); + shader_program->set_uniform("resolution", mgl::vec2f(texture->get_size().x, texture->get_size().y)); mgl::Sprite sprite(texture, { 100.0f - 10.0f, 0.0f }); sprite.set_color({255, 255, 255, 128}); @@ -49,7 +49,7 @@ int main(int argc, char **argv) { return 1; mgl::Texture texture; - if(!texture.load_from_file("depends/mgl/tests/X11.png")) + if(!texture.load_from_file("depends/mgl/tests/X11.jpg")) return 1; mgl::Font font; -- cgit v1.2.3