Skip to content

Commit affb48f

Browse files
authored
Allow creation of 3d textures with --depth 1. (KhronosGroup#610)
Fixes KhronosGroup#609.
1 parent 1aeb9b2 commit affb48f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/texture.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ ktxTexture_construct(ktxTexture* This, ktxTextureCreateInfo* createInfo,
138138
if (createInfo->numLayers == 0)
139139
return KTX_INVALID_VALUE;
140140
This->numLayers = createInfo->numLayers;
141+
This->isArray = createInfo->isArray;
141142

142143
if (createInfo->numFaces == 6) {
143144
if (This->numDimensions != 2) {
@@ -171,9 +172,6 @@ ktxTexture_construct(ktxTexture* This, ktxTextureCreateInfo* createInfo,
171172
}
172173
}
173174

174-
This->numLayers = createInfo->numLayers;
175-
This->isArray = createInfo->isArray;
176-
177175
ktxHashList_Construct(&This->kvDataHead);
178176
return KTX_SUCCESS;
179177
}

0 commit comments

Comments
 (0)