aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-22 07:03:45 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-22 08:18:09 +0200
commitdf2e6771c5bf6f09e62f9d6b86d83a2631ea365f (patch)
tree97eef20a43f4b240ecb173b08df3c60c4f8658fb /tests
parentfaa74e2c942102a9b1aa215a913fddf422714d7e (diff)
Use const where possible in function params
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/main.c b/tests/main.c
index 0e6e199..0001288 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -28,7 +28,6 @@ static void draw(mgl_window *window, void *userdata) {
};
mgl_rectangle_draw(context, &rect);
- /*mgl_shader_program_set_uniform_texture2d(u->shader_program, "texture", u->texture);*/
mgl_shader_program_set_uniform_vec2f(u->shader_program, "resolution", (mgl_vec2f){ window->size.x, window->size.y });
mgl_sprite sprite;
@@ -87,23 +86,23 @@ int main(int argc, char **argv) {
mgl_vertex vertices[4] = {
(mgl_vertex){
.position = {0.0f, 0.0f},
- .color = {255, 0, 0, 100},
- .texcoords = {0.0f, 0.0f}
+ .texcoords = {0.0f, 0.0f},
+ .color = {255, 0, 0, 100}
},
(mgl_vertex){
.position = {font.texture.width, 0.0f},
+ .texcoords = {1.0f, 0.0f},
.color = {0, 255, 0, 100},
- .texcoords = {1.0f, 0.0f}
},
(mgl_vertex){
.position = {font.texture.width, font.texture.height},
+ .texcoords = {1.0f, 1.0f},
.color = {0, 0, 255, 100},
- .texcoords = {1.0f, 1.0f}
},
(mgl_vertex){
.position = {0.0f, font.texture.height},
- .color = {255, 0, 255, 100},
- .texcoords = {0.0f, 1.0f}
+ .texcoords = {0.0f, 1.0f},
+ .color = {255, 0, 255, 100}
}
};