From 6bd79c8ff8256512754c641def0936a2e08b2001 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 6 Jun 2022 02:20:55 +0000 Subject: [PATCH] .ktx 2darray textures were being written incorrectly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6260 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/client/image.c b/engine/client/image.c index 5586aacb7..6d5373e2c 100644 --- a/engine/client/image.c +++ b/engine/client/image.c @@ -5146,12 +5146,12 @@ qboolean Image_WriteKTXFile(const char *filename, enum fs_relative fsroot, struc case PTI_ANY: VFS_CLOSE(file); return false; - case PTI_2D: - case PTI_2D_ARRAY: - case PTI_CUBE: - case PTI_CUBE_ARRAY: + case PTI_CUBE: //special case, size is per-face sz = (browbytes+padbytes) * brows; break; + case PTI_2D: + case PTI_2D_ARRAY: + case PTI_CUBE_ARRAY: case PTI_3D: sz = (browbytes+padbytes) * brows * blayers; break;