# PVRVFrame - bug - ES2 - glActiveTexture

**URL:** <https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222>\
**Category:** PowerVR Insider\
**Tags:** pvrvframe\
**Created:** [October 27, 2011, 4:34pm UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222 "2011-10-27T16:34:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![diafera](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@diafera](https://forums.imgtec.com/u/diafera)\
**Post date:** [October 27, 2011, 4:34pm UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/1 "2011-10-27T16:34:58Z")

</div>

Using PVRFrame 2.9.29.0649, OpenGL ES 2.0, on Windows (libGLESv2.dll)…  
GL\_MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS return 32, but glActiveTexture starts failing with texture unit \>= GL\_TEXTURE0 + 8.  
  
Code to reproduce the issue:  
  
GLuint nTexUnits = 8;  
glGetIntegerv(GL\_MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS, (GLint\*)&nTexUnits); // nTexUnits=32, err=GL\_NO\_ERROR  
for (GLuint i = 0; i \< nTexUnits; i++)  
&nbsp;&nbsp;&nbsp; glActiveTexture(GL\_TEXTURE0 + i); //err=GL\_INVALID\_ENUM when i \>= 8 !!!  
// PVRVFrame: “In glActiveTexture error: 500 (GL\_INVALID\_ENUM) : texture number is out of range (min: GL\_TEXTURE0), max: GL\_TEXTURE0 + 7, given: GL\_TEXTURE0 + 8)”  
[/CODE]  
  
This bugs was not present in PVRFrame 2.8 .\*.

`<br>GLuint nTexUnits = 8;<br>glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, (GLint*)&amp;nTexUnits); <font color="#006600">// nTexUnits=32, err=GL_NO_ERROR</font><br>for (GLuint i = 0; i &lt; nTexUnits; i++)<br>&nbsp;&nbsp;&nbsp; glActiveTexture(GL_TEXTURE0 + i); <font color="#006600">//err=GL_INVALID_ENUM when i &gt;= 8 !!!</font><br><font color="#006600">// PVRVFrame: "In glActiveTexture error: 500 (GL_INVALID_ENUM) : texture number is out of range (min: GL_TEXTURE0), max: GL_TEXTURE0 + 7, given: GL_TEXTURE0 + 8)"</font></font><font face="Courier New, Courier, mono" size="1"><br></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font face="Courier New, Courier, mono" size="1">`  
  
This bugs was not present in PVRFrame 2.8 .\*.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [October 28, 2011, 6:18am UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/2 "2011-10-28T06:18:16Z")

</div>

Hi diafera,  
  
Thank you for your bug report! This bug was unfortunately brought on when attempting to fix a similar bug. We’ve caught this one already, but slightly too late for the release unfortunately. A fix for this should make it into the next release.  
  
Thanks,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![benualdo](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@benualdo](https://forums.imgtec.com/u/benualdo)\
**Post date:** [December 12, 2011, 4:30pm UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/3 "2011-12-12T16:30:32Z")

</div>

Hi Tobias,  
  
  
  
  
  
We are currently being blocked by this issue, do you have a date for this next release that should fix this bug?  
  
  
  
  
  
Thanks,  
  
  
  
  
  
BenoÃ®t.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [December 14, 2011, 4:21pm UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/4 "2011-12-14T16:21:19Z")

</div>

Hi BenoÃ®t,  
  
Our next release won't be until sometime early next year now. If this is proving to be a major barrier for you, if you can email us at [devtech@imgtec.com](mailto:devtech@imgtec.com) I should be able to provide you with drop of the tool where this has been resolved.  
  
Thanks,  
  
Tobias  
  
  
  
Tobias2011-12-14 17:21:46

---

<div class="post-metadata">

**Author:** ![benualdo](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@benualdo](https://forums.imgtec.com/u/benualdo)\
**Post date:** [December 14, 2011, 7:22pm UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/5 "2011-12-14T19:22:44Z")

</div>

ok, thanks!  
  
  
  ![]()  
  
  
Benoit

---

<div class="post-metadata">

**Author:** ![diafera](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@diafera](https://forums.imgtec.com/u/diafera)\
**Post date:** [April 4, 2012, 11:33am UTC](https://forums.imgtec.com/t/pvrvframe-bug-es2-glactivetexture/1222/6 "2012-04-04T11:33:27Z")

</div>

The bug is still present in PVRFrame 2.10@812485…  
GL\_MAX\_COMBINED\_TEXTURE\_IMAGE\_UNITS now returns 160 ![Shocked]()  
  
Also in PVRFrame 2.10@812485, the Windows dlls for GLES-2.0 and GLES-3.0 reports as being “OpenGL ES-CM 1.1” instead of being “OpenGL ES 2.0”. The ones for Linux/MacOS seems to report fine.
