mipmap in Android 1.5

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

mipmap in Android 1.5

Postby cosminb » Sun Dec 13, 2009 12:29 pm

Hi,

Does anyone know how to generate mipmaps in Android 1.5? This one doesn't support OpenGL ES 1.1, which has gluGenerateMipmap().
So I thought of using GLUtils.texImage2D(GL10.GL_TEXTURE_2D, n, texture[n], 0); with n from 0 to let's say 2, and the texture size decreasing by half. However, when I bind to that texture, everything is white. If I only put the first texture (i.e. n = 0), it shows the texture, but no mipmap.

How should I implement mipmaps in OpenGL ES 1.0?

Thanks in advance,
Cosmin

P.S. I'm only starting in OpenGL on Android, so the information may be inaccurate.
cosminb
Freshman
Freshman
 
Posts: 6
Joined: Sun Dec 13, 2009 12:20 pm

Top

[SOLVED] mipmap in Android 1.5

Postby cosminb » Sun Dec 13, 2009 5:42 pm

Ok, I found out what was causing the problem. I wasn't going through all the mipmap levels. It seems like in order to get a valid mipmap texture, you need to generate all levels, i.e. until both the width and height of your mipmap reach 1x1.
cosminb
Freshman
Freshman
 
Posts: 6
Joined: Sun Dec 13, 2009 12:20 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests