Skip to content

Commit

Permalink
Made get texture wrap string functions take a const pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukobyte committed Oct 5, 2024
1 parent 573d957 commit c0cd22d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions seika/rendering/texture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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";
}
4 changes: 2 additions & 2 deletions seika/rendering/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion seika/version_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit c0cd22d

Please sign in to comment.