aboutsummaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-25 00:01:43 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-25 00:01:43 +0200
commit05da9076d3d1b0d770c13572368f974786edcd92 (patch)
treef34297432006b714914ba97c281521262b842c42 /src/graphics
parent5cc09d9389243791f8f65f96a4d19a74337f2a73 (diff)
Use const pointer
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/texture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/texture.c b/src/graphics/texture.c
index 128d910..e098dd2 100644
--- a/src/graphics/texture.c
+++ b/src/graphics/texture.c
@@ -75,7 +75,7 @@ int mgl_texture_init(mgl_texture *self) {
return 0;
}
-int mgl_texture_load_from_file(mgl_texture *self, const char *filepath, mgl_texture_load_options *load_options) {
+int mgl_texture_load_from_file(mgl_texture *self, const char *filepath, const mgl_texture_load_options *load_options) {
mgl_image image;
if(mgl_image_load_from_file(&image, filepath) != 0)
return -1;
@@ -85,11 +85,11 @@ int mgl_texture_load_from_file(mgl_texture *self, const char *filepath, mgl_text
return result;
}
-int mgl_texture_load_from_image(mgl_texture *self, const mgl_image *image, mgl_texture_load_options *load_options) {
+int mgl_texture_load_from_image(mgl_texture *self, const mgl_image *image, const mgl_texture_load_options *load_options) {
return mgl_texture_load_from_memory(self, image->data, image->width, image->height, image->format, load_options);
}
-int mgl_texture_load_from_memory(mgl_texture *self, const unsigned char *data, int width, int height, mgl_image_format format, mgl_texture_load_options *load_options) {
+int mgl_texture_load_from_memory(mgl_texture *self, const unsigned char *data, int width, int height, mgl_image_format format, const mgl_texture_load_options *load_options) {
if(width < 0 || height < 0)
return -1;
@@ -129,7 +129,7 @@ int mgl_texture_update(mgl_texture *self, const unsigned char *data, int offset_
return 0;
}
-int mgl_texture_resize(mgl_texture *self, int new_width, int new_height, mgl_texture_load_options *load_options) {
+int mgl_texture_resize(mgl_texture *self, int new_width, int new_height, const mgl_texture_load_options *load_options) {
if(new_width == self->width && new_height == self->height)
return 0;