From 791e7304a6dbc6dffedea26e085efd15155216db Mon Sep 17 00:00:00 2001 From: korenkonder Date: Thu, 6 Jun 2024 10:17:30 +0300 Subject: [PATCH] Fixed color_tone texture size if not square --- src/DivaGL/texture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DivaGL/texture.cpp b/src/DivaGL/texture.cpp index a295176..d003b57 100644 --- a/src/DivaGL/texture.cpp +++ b/src/DivaGL/texture.cpp @@ -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); }