Hey, I’m developing an application that needs to load multiple textures (mostly ktx1 or ktx2) in one big binary file that I load into memory and read.
I want to use PVRTexLib to get an uncompressed array of pixels but the problem is that API has only one constructor to load from memory and as constructor description says “Header may be any version of PVR.”. I assumed that constructor could only load pvr but still i tried to load ktx hoping for luck and i just got an error about a invalid data pointer.
I also looked at all examples, but none of them have anything that can relate to loading textures from memory.
As a workaround, I can save texture buffer to a temporary file and then read it, but this is not a very elegant way.
So, is there any way to load ktx file directly from memory using PVRTexLib?