diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-11-05 14:44:21 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-05 14:44:21 +0100 |
commit | ccb3e58071b3e807109918184727b305df8b96a0 (patch) | |
tree | d8830f9a3ec84ea17fea064b3ff27b2112c4ca74 /tests | |
parent | 7dd8b0cc0561c5fa0c9096b79fb7f0647b3470b4 (diff) |
Fix font being corrupt with certain sizes, fix image being corrupt if its rgb, fix window resize incorrect size
Diffstat (limited to 'tests')
-rw-r--r-- | tests/X11.jpg | bin | 0 -> 19567 bytes | |||
-rw-r--r-- | tests/main.c | 4 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/X11.jpg b/tests/X11.jpg Binary files differnew file mode 100644 index 0000000..95e4793 --- /dev/null +++ b/tests/X11.jpg 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) |