Fixed color_tone texture size if not square
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user