160 memset(&tex[i], 0, sizeof(AscTexture)); |
160 memset(&tex[i], 0, sizeof(AscTexture)); |
161 } |
161 } |
162 glDeleteTextures(count, textures); |
162 glDeleteTextures(count, textures); |
163 } |
163 } |
164 |
164 |
|
165 bool asc_texture_is_uv_normalized(const AscTexture *tex) { |
|
166 return tex->target != GL_TEXTURE_RECTANGLE; |
|
167 } |
|
168 |
165 asc_vec2f asc_texture_calculate_uv_scale(const AscTexture *tex, asc_vec2u surface_dimension, asc_vec2f factors) { |
169 asc_vec2f asc_texture_calculate_uv_scale(const AscTexture *tex, asc_vec2u surface_dimension, asc_vec2f factors) { |
166 if (surface_dimension.width == 0 || surface_dimension.height == 0) { |
170 if (surface_dimension.width == 0 || surface_dimension.height == 0) { |
167 asc_wprintf("Tried to calculate UV scale for texture %u with zero dimensions.", tex->tex_id); |
171 asc_wprintf("Tried to calculate UV scale for texture %u with zero dimensions.", tex->tex_id); |
168 return factors; |
172 return factors; |
169 } |
173 } |