From c0cd22d2c3303d092b63479d9d8378c469619db2 Mon Sep 17 00:00:00 2001 From: Chukobyte Date: Sat, 5 Oct 2024 14:11:59 -0400 Subject: [PATCH] Made get texture wrap string functions take a const pointer. --- seika/rendering/texture.c | 6 +++--- seika/rendering/texture.h | 4 ++-- seika/version_info.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/seika/rendering/texture.c b/seika/rendering/texture.c index a182348..0e6d865 100644 --- a/seika/rendering/texture.c +++ b/seika/rendering/texture.c @@ -24,7 +24,7 @@ static const struct SkaTexture DEFAULT_TEXTURE_REF = { .fileName = NULL }; -static inline bool ska_texture_is_texture_valid(SkaTexture* texture) { +static inline bool ska_texture_is_texture_valid(const SkaTexture* texture) { return texture != NULL; } @@ -143,10 +143,10 @@ GLint ska_texture_wrap_string_to_int(const char* wrap) { return GL_CLAMP_TO_BORDER; } -const char* ska_texture_get_wrap_s_string(SkaTexture* texture) { +const char* ska_texture_get_wrap_s_string(const SkaTexture* texture) { return texture->wrapS == GL_REPEAT ? "repeat" : "clamp_to_border"; } -const char* ska_texture_get_wrap_t_string(SkaTexture* texture) { +const char* ska_texture_get_wrap_t_string(const SkaTexture* texture) { return texture->wrapT == GL_REPEAT ? "repeat" : "clamp_to_border"; } diff --git a/seika/rendering/texture.h b/seika/rendering/texture.h index fe9abeb..f21b428 100644 --- a/seika/rendering/texture.h +++ b/seika/rendering/texture.h @@ -34,8 +34,8 @@ SkaTexture* ska_texture_create_texture_from_memory2(const void* buffer, usize bu SkaTexture* ska_texture_create_solid_colored_texture(GLsizei width, GLsizei height, GLuint colorValue); void ska_texture_delete(SkaTexture* texture); GLint ska_texture_wrap_string_to_int(const char* wrap); -const char* ska_texture_get_wrap_s_string(SkaTexture* texture); -const char* ska_texture_get_wrap_t_string(SkaTexture* texture); +const char* ska_texture_get_wrap_s_string(const SkaTexture* texture); +const char* ska_texture_get_wrap_t_string(const SkaTexture* texture); #ifdef __cplusplus } diff --git a/seika/version_info.h b/seika/version_info.h index 8df35b0..37e796d 100644 --- a/seika/version_info.h +++ b/seika/version_info.h @@ -4,6 +4,6 @@ #define SKA_VERSION_MAJOR 0 #define SKA_VERSION_MINOR 1 -#define SKA_VERSION_PATCH 5 +#define SKA_VERSION_PATCH 6 #define SKA_VERSION (SKA_MACRO_TO_STRING(SKA_VERSION_MAJOR) "." SKA_MACRO_TO_STRING(SKA_VERSION_MINOR) "." SKA_MACRO_TO_STRING(SKA_VERSION_PATCH))