Fixed color_tone texture size if not square

This commit is contained in:
korenkonder
2024-06-06 10:17:30 +03:00
parent a8d3a63c28
commit 791e7304a6
+2 -2
View File
@@ -115,7 +115,7 @@ void texture_apply_color_tone(texture* chg_tex, texture* org_tex, color_tone* co
texture_bind(chg_tex->target, chg_tex->glid);
uint32_t width = texture_get_width_mip_level(org_tex, i);
uint32_t height = texture_get_width_mip_level(org_tex, i);
uint32_t height = texture_get_height_mip_level(org_tex, i);
glCompressedTexSubImage2D(chg_tex->target, i, 0, 0, width, height,
chg_tex->internal_format, size, data);
}
@@ -126,7 +126,7 @@ void texture_apply_color_tone(texture* chg_tex, texture* org_tex, color_tone* co
texture_bind(chg_tex->target, chg_tex->glid);
uint32_t width = texture_get_width_mip_level(org_tex, i);
uint32_t height = texture_get_width_mip_level(org_tex, i);
uint32_t height = texture_get_height_mip_level(org_tex, i);
glTexSubImage2DDLL(chg_tex->target, i, 0, 0, width, height,
GL_RGB, GL_UNSIGNED_SHORT_5_6_5, data);
}