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
I know that versions
But these deliver a
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
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?
Since there is no possibility for the library to guess your intention you needed to specify either
After that you can safely cast
texture to a
ktxTexture when calling
The documentation now available on GitHub describes this correctly. I think you must have been looking at old documentation.
I know how to do it now!
By the way, I used the documentation at khronos.org/ktx/documentation/libktx/index.html#overview
When possible someone should add a link to the newer GitHub docu and mark that code as deprecated somehow?