# glGenerateMipmap working on emulation ...

**URL:** <https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710>\
**Category:** PowerVR Insider\
**Created:** [May 28, 2010, 12:27pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710 "2010-05-28T12:27:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/tryum/32/61_2.png) [@tryum](https://forums.imgtec.com/u/tryum)\
**Post date:** [May 28, 2010, 12:27pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710/1 "2010-05-28T12:27:01Z")

</div>

… and not on hardware.  
  
  
  
  
  
I’m not getting any GL error … but I get no texture (everything is black).  
  
  
  
  
  
Any hint ?

---

<div class="post-metadata">

**Author:** ![xmas](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@xmas](https://forums.imgtec.com/u/xmas)\
**Post date:** [May 28, 2010, 12:30pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710/2 "2010-05-28T12:30:29Z")

</div>

How do you create the texture, what is the size, format, etc?

---

<div class="post-metadata">

**Author:** ![tryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/tryum/32/61_2.png) [@tryum](https://forums.imgtec.com/u/tryum)\
**Post date:** [May 28, 2010, 12:41pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710/3 "2010-05-28T12:41:30Z")

</div>

glTexImage2D( GL\_TEXTURE\_2D, 0, InternalFormat, Image-\>getDimension().Width,  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Image-\>getDimension().Height, 0, PixelFormat, PixelType, source );  
  
  
  
  
  
With InternalFormat and PixelFormat as GL\_RGBA and PixelType as GL\_UNSIGNED\_BYTE  
  
  
  
  
  
It happens with various textures of various size. for instance a 1024x1024.

---

<div class="post-metadata">

**Author:** ![xmas](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@xmas](https://forums.imgtec.com/u/xmas)\
**Post date:** [May 28, 2010, 1:14pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710/4 "2010-05-28T13:14:06Z")

</div>

Hm, this looks like it should work. glGenerateMipmap won’t work for non-power-of-two textures or compressed textures, though. Does the glGenerateMipmap call immediately follow glTexImage2D?  
  
  
  
  
  
What is the hardware/driver you’re running this on?

---

<div class="post-metadata">

**Author:** ![tryum](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/tryum/32/61_2.png) [@tryum](https://forums.imgtec.com/u/tryum)\
**Post date:** [May 28, 2010, 2:44pm UTC](https://forums.imgtec.com/t/glgeneratemipmap-working-on-emulation/710/5 "2010-05-28T14:44:38Z")

</div>

I tried with npot and pot textures, i have the same result :  
  
  
  
  
  
I’m using 3.01.00.02 drivers (angstrom) on an omap3 board (igepv2) … Last time I tried to update my system, it broke 3D support.
