Login  Register

Re: PVRTC textures in JOGL2?

Posted by asambol on Oct 18, 2013; 1:15pm
URL: https://forum.jogamp.org/PVRTC-textures-in-JOGL2-tp4030250p4030304.html

I managed to solve it. I made a mistake by loading the entire file into ByteBuffer, instead of omitting PVR header and metadata (according to Imagination Tech. specification).

The procedure is actually very similar to loading DDS images - only the header is different and internalFormat needs to be changed according to Khronos specification:
- PVRTC2 4bpp: internalFormat = 0x8C02; // GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
- PVRTC 4bpp: internalFormat = 0x9138; // GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG

BTW,  PVR can actually contain DXT1-5 and many other compressed/uncompressed formats.