aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/X11.jpgbin0 -> 19567 bytes
-rw-r--r--tests/main.c4
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/X11.jpg b/tests/X11.jpg
new file mode 100644
index 0000000..95e4793
--- /dev/null
+++ b/tests/X11.jpg
Binary files differ
diff --git a/tests/main.c b/tests/main.c
index 878f8ff..d430ab2 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -32,7 +32,7 @@ static void draw(mgl_window *window, void *userdata) {
};
mgl_rectangle_draw(context, &rect);
- mgl_shader_program_set_uniform_vec2f(u->shader_program, "resolution", (mgl_vec2f){ window->size.x, window->size.y });
+ mgl_shader_program_set_uniform_vec2f(u->shader_program, "resolution", (mgl_vec2f){ u->texture->width, u->texture->height });
mgl_sprite sprite;
mgl_sprite_init(&sprite, u->texture, 100.0f - 10.0f, 0.0f);
@@ -117,7 +117,7 @@ int main(int argc, char **argv) {
if(mgl_window_create(&window, "mgl", 1280, 720) != 0)
return 1;
- if(mgl_texture_load_from_file(&texture, "tests/X11.png", NULL) != 0)
+ if(mgl_texture_load_from_file(&texture, "tests/X11.jpg", NULL) != 0)
return 1;
if(mgl_font_load_from_file(&font, "/usr/share/fonts/noto/NotoSans-Regular.ttf", 32) != 0)