Updating a region inside a PVRTC texture

Hello there,

I would like to update a region inside a PVRTC texture. I know that using glCompressedTexSubImage2D is not working on iOS, so what I tried to do is to update the texture data array manually, by simply copying over certain pixels from a different PVRTC texture. Now I do get strange results however (garbled data basically).
Before I further try to debug this, is it even possible to do that (i.e. simply copying over the pixels from one image to a region in another image)?

Would love to get an answer.

Kind regards,

Hi mhooo,

PVRTC textures are twiddled (laid out in Morton order), so it is not possible to use the usual linear adressing to replace sub-parts of the textures. Furthermore as PVRTC regions are referencing neighbouring regions for the AB-color interpolation and modulation data you will have to incorporate padding around the texture part you are replacing.