diff options
Diffstat (limited to 'gfx/src/asset/texture.c')
-rw-r--r-- | gfx/src/asset/texture.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gfx/src/asset/texture.c b/gfx/src/asset/texture.c index d15f09f..3a82788 100644 --- a/gfx/src/asset/texture.c +++ b/gfx/src/asset/texture.c | |||
@@ -61,7 +61,7 @@ Texture* gfx_texture_load( | |||
61 | stbi_set_flip_vertically_on_load(0); | 61 | stbi_set_flip_vertically_on_load(0); |
62 | pixels[0] = stbi_load(filepath, &width, &height, &components, 0); | 62 | pixels[0] = stbi_load(filepath, &width, &height, &components, 0); |
63 | if (!pixels[0]) { | 63 | if (!pixels[0]) { |
64 | set_error("Failed to load texture file: %s", filepath); | 64 | log_error("Failed to load texture file: %s", filepath); |
65 | } | 65 | } |
66 | break; | 66 | break; |
67 | } | 67 | } |
@@ -74,11 +74,11 @@ Texture* gfx_texture_load( | |||
74 | stbi_uc* image_pixels = | 74 | stbi_uc* image_pixels = |
75 | stbi_load(filepath, &width, &height, &components, 0); | 75 | stbi_load(filepath, &width, &height, &components, 0); |
76 | if (!image_pixels) { | 76 | if (!image_pixels) { |
77 | set_error("Failed to load texture file: %s", filepath); | 77 | log_error("Failed to load texture file: %s", filepath); |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | if (i > 0 && components != old_components) { | 80 | if (i > 0 && components != old_components) { |
81 | set_error("All textures in a cubemap must have the same number of " | 81 | log_error("All textures in a cubemap must have the same number of " |
82 | "components"); | 82 | "components"); |
83 | break; | 83 | break; |
84 | } | 84 | } |
@@ -93,7 +93,7 @@ Texture* gfx_texture_load( | |||
93 | break; | 93 | break; |
94 | case AssetFromMemory: | 94 | case AssetFromMemory: |
95 | // TODO: Load textures from memory. | 95 | // TODO: Load textures from memory. |
96 | set_error("Loading textures from memory is not yet implemented"); | 96 | log_error("Loading textures from memory is not yet implemented"); |
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
@@ -132,7 +132,7 @@ Texture* gfx_texture_load( | |||
132 | desc.format = TextureSRGB8; | 132 | desc.format = TextureSRGB8; |
133 | break; | 133 | break; |
134 | default: | 134 | default: |
135 | set_error("Unsupported texture colour space: %d", cmd->colour_space); | 135 | log_error("Unsupported texture colour space: %d", cmd->colour_space); |
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | break; | 138 | break; |
@@ -145,12 +145,12 @@ Texture* gfx_texture_load( | |||
145 | desc.format = TextureSRGBA8; | 145 | desc.format = TextureSRGBA8; |
146 | break; | 146 | break; |
147 | default: | 147 | default: |
148 | set_error("Unsupported texture colour space: %d", cmd->colour_space); | 148 | log_error("Unsupported texture colour space: %d", cmd->colour_space); |
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | break; | 151 | break; |
152 | default: | 152 | default: |
153 | set_error("Unsupported number of texture components: %d", components); | 153 | log_error("Unsupported number of texture components: %d", components); |
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||