Skip to content

Commit

Permalink
Allow creation of 3d textures with --depth 1. (KhronosGroup#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCallow authored Aug 4, 2022
1 parent 7d8bacb commit 8c143cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/texture.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ ktxTexture_construct(ktxTexture* This, ktxTextureCreateInfo* createInfo,
if (createInfo->numLayers == 0)
return KTX_INVALID_VALUE;
This->numLayers = createInfo->numLayers;
This->isArray = createInfo->isArray;

if (createInfo->numFaces == 6) {
if (This->numDimensions != 2) {
Expand Down Expand Up @@ -171,9 +172,6 @@ ktxTexture_construct(ktxTexture* This, ktxTextureCreateInfo* createInfo,
}
}

This->numLayers = createInfo->numLayers;
This->isArray = createInfo->isArray;

ktxHashList_Construct(&This->kvDataHead);
return KTX_SUCCESS;
}
Expand Down

0 comments on commit 8c143cc

Please sign in to comment.