mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-02 12:19:17 -05:00
Update rl_gputex.h
This commit is contained in:
6
src/external/rl_gputex.h
vendored
6
src/external/rl_gputex.h
vendored
@ -477,10 +477,10 @@ int rl_save_ktx(const char *file_name, void *data, int width, int height, int fo
|
|||||||
// Calculate file data_size required
|
// Calculate file data_size required
|
||||||
int data_size = sizeof(ktx_header);
|
int data_size = sizeof(ktx_header);
|
||||||
|
|
||||||
for (int i = 0, width = width, height = height; i < mipmaps; i++)
|
for (int i = 0, w = width, h = height; i < mipmaps; i++)
|
||||||
{
|
{
|
||||||
data_size += get_pixel_data_size(width, height, format);
|
data_size += get_pixel_data_size(w, h, format);
|
||||||
width /= 2; height /= 2;
|
w /= 2; h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *file_data = RL_CALLOC(data_size, 1);
|
unsigned char *file_data = RL_CALLOC(data_size, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user