Hello.
I took the example code of Writing a KTX file from the documentation overview.
I’m doing cross-platform developement and for now implementing texture creation for OpenGL.
The problem I have is that the function
ktxTexture_Create(&createInfo,
KTX_TEXTURE_CREATE_ALLOC_STORAGE,
&texture);
is missing!
I know that versions ktxTexture1_Create
(and 2
) exist.
But these deliver a ktxTexture1
.
When I try to fill the texture later with
ktxTexture_SetImageFromMemory(texture, level, layer, faceSlice,
(const ktx_uint8_t *)data->getContent(), data->getSize());
I need a ktxTexture
not a ktxTexture1
.
So where is my mistake, how can I correctly create a KTX texture? Or, can I safely cast from ktxTexture1 to ktxTexture
? Am I missing some #define?