Detecting/anticipating texture creation failure

With OpenGL-ES 1.1, I can’t find any documentation that describes how to detect whether the creation of a new texture will fail (or has failed) because of texture memory limits.

Can someone enlighten me on how this can be done?

The second question is how can I obtain the texture memory limits?

If the GL implementation runs out of memory for any reason it will generate a GL_OUT_OF_MEMORY error. So you have to call glGetError after glTexImage2D.

The second question is how can I obtain the texture memory limits?

There is no way to do this.

Hi all! One question on-the-fly.
Loading 10 textures 256x256 each is too much for a mobile phone?? Each texture weights about 10KB.

I’m asking this because I’m having problems with my application on Nokia 2nd edition devices. I’ve noticed that application stops loading after 4 textures, that is the 5th is the one creating the problem.
This is almost surely a memory issue, so I was wondering if what count on texture memory limits are the dimension (256x256 is huge image matrix) or the effective weight in bytes.

Thx in advance for your help!
Regards,
Adriano

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.