Updating a region inside a PVRTC texture

This topic contains 1 reply, has 2 voices, and was last updated by  marco 5 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30770

    mhooo
    Member

    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,
    mhooo

    #35509

    marco
    Member

    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.

    Regards,

    Marco

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.