# All 4 texture units enabled/disabled at once. Bug?

**URL:** <https://forums.imgtec.com/t/all-4-texture-units-enabled-disabled-at-once-bug/1432>\
**Category:** PowerVR Insider\
**Tags:** pvrvframe\
**Created:** [June 1, 2012, 4:52pm UTC](https://forums.imgtec.com/t/all-4-texture-units-enabled-disabled-at-once-bug/1432 "2012-06-01T16:52:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![k0dek0mmand0](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/k0dek0mmand0/32/152_2.png) [@k0dek0mmand0](https://forums.imgtec.com/u/k0dek0mmand0)\
**Post date:** [June 1, 2012, 4:52pm UTC](https://forums.imgtec.com/t/all-4-texture-units-enabled-disabled-at-once-bug/1432/1 "2012-06-01T16:52:45Z")

</div>

Hello!

  

I’ve been attempting to work with multiple texture units in both the ES 1.1 emulator and&nbsp;PVRVFrame - the 2.10 version on Windows 7 64 bit, but in 32 bit mode.

  

A funny thing happens: If I activate any texture unit and enable/disable it, all other texture units (4 are advertised) become enabled/disabled. Similar code on iPhone hardware works as expected: each texture unit is enabled/disabled separately.

  

Has anyone experienced this?&nbsp;

  

Is this a limitiation of the emulator? If so, why doesn’t&nbsp;PVRVFrame work correctly?

  

Is the ES 1.1 profile emulator still being developed?

  

Here is a c++ code snippet to quickly reproduce:

  

// start with ‘fresh’ context\<span =“Apple-tab-span” style=“white-space:pre”\> 

glActiveTexture(GL\_TEXTURE0);

int ena0 = glIsEnabled( GL\_TEXTURE\_2D ); // equals 0, OK

glActiveTexture(GL\_TEXTURE1);

int ena1 = glIsEnabled( GL\_TEXTURE\_2D ); // equals 0, OK

  

glActiveTexture(GL\_TEXTURE0);

glEnable(GL\_TEXTURE\_2D); // enable unit 0

ena0 = glIsEnabled( GL\_TEXTURE\_2D ); // equals 1, OK

glActiveTexture(GL\_TEXTURE1);

ena1 = glIsEnabled( GL\_TEXTURE\_2D ); // equals 1, should be 0, not OK

---

<div class="post-metadata">

**Author:** ![ChrisPenrose](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@ChrisPenrose](https://forums.imgtec.com/u/ChrisPenrose)\
**Post date:** [July 6, 2012, 12:43pm UTC](https://forums.imgtec.com/t/all-4-texture-units-enabled-disabled-at-once-bug/1432/2 "2012-07-06T12:43:12Z")

</div>

Hi there,  
  
Thanks for the info. This is indeed a bug in the current version of the emulator. I'll push an updated version onto the website soon which will fix this and a number of other issues. In the meantime if this is a blocking issue for you then send an e-mail to [devtech@imgtec.com](mailto:devtech@imgtec.com) referencing this thread and I'll hook you up with a development drop for your platform.  
  
  
  
chris2012-07-06 14:43:48

---

<div class="post-metadata">

**Author:** ![k0dek0mmand0](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/k0dek0mmand0/32/152_2.png) [@k0dek0mmand0](https://forums.imgtec.com/u/k0dek0mmand0)\
**Post date:** [July 6, 2012, 12:52pm UTC](https://forums.imgtec.com/t/all-4-texture-units-enabled-disabled-at-once-bug/1432/3 "2012-07-06T12:52:39Z")

</div>

Hello!

  

Thanks for this, the fix for this bug will really help me out.

I think I’ll wait for the updated version of the emulator, since I’m currently busy on other projects.
