Opengl Texture Compression

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

Opengl Texture Compression

Postby Hachaso » Tue Apr 06, 2010 12:34 pm

Hi!

I have managed to create a plane using a 512x512 texture. The reason why it is so big is because I get better quality in the image. I have noticed that when using such a big image the FPS is around 15 fps.
If I reduce the image size to 256x256 instead. I get around 20 fps.

Is there any way to compress the texture and save it to graphics memory.
Could I use ARB_texture_compression with Android?
Seems to be something that is used on other OpenGL ES devices.
Can't find it in the Android OpenGL ES documentation.

Please help.
Hachaso
Developer
Developer
 
Posts: 43
Joined: Mon Jan 26, 2009 11:44 am

Top

Postby d1mbu1b » Fri Apr 16, 2010 2:48 pm

I am having the same trouble finding guidence.
look at the iPhone guidence and you will see compression optimations for the powerVR SGX core
If your device has powerVR technology you can do that, but probably only through the NDK.

If your frame rate is suffering from one image you might make sure you are preloading the texture (glTexture2d() at startup and not each render.
Compressed texture formats are GPU specific and I have not found a generic capability in the openGL es spec.
Intuitively I would have expected to see at least a runlength encoding if not png/jpg.
Ideally it would be nice to pass a png to glTexture2d()...

Right now the only tips I can offer are to reduce the color depth and preload the image, or what I do, is compile the image straight into code using the NDK:
convert png to a RGBA array of bytes in a source file then compile that auto generated source.
This makes your application bigger, but eliminates any initialization delay.
d1mbu1b
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 16, 2010 2:28 pm

Postby d1mbu1b » Fri Apr 16, 2010 3:12 pm

found this for AMD on snapdragon...
http://www.opengl.org/discussion_boards ... ber=262790
d1mbu1b
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 16, 2010 2:28 pm

Top

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

Who is online

Users browsing this forum: No registered users and 1 guest