# Updating a region inside a PVRTC texture

**URL:** https://forums.imgtec.com/t/updating-a-region-inside-a-pvrtc-texture/1323
**Category:** PowerVR Insider
**Created:** [March 4, 2012, 1:07am UTC](https://forums.imgtec.com/t/updating-a-region-inside-a-pvrtc-texture/1323 "2012-03-04T01:07:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mhooo](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@mhooo](https://forums.imgtec.com/u/mhooo)
#### Post date: [March 4, 2012, 1:07am UTC](https://forums.imgtec.com/t/updating-a-region-inside-a-pvrtc-texture/1323/1 "2012-03-04T01:07:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![marco](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/marco/32/96_2.png) [@marco](https://forums.imgtec.com/u/marco)
#### Post date: [March 5, 2012, 5:15am UTC](https://forums.imgtec.com/t/updating-a-region-inside-a-pvrtc-texture/1323/2 "2012-03-05T05:15:55Z")

</div>

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
