Android opengl releasing textures
Posted
by
user1642418
on Stack Overflow
See other posts from Stack Overflow
or by user1642418
Published on 2012-09-02T21:36:42Z
Indexed on
2012/09/02
21:37 UTC
Read the original article
Hit count: 204
I have a bit of a problem. I am developing a game for android + engine and I got stuck.
I am getting OpenGL out of memory error and either app crashes or phone hangs after loading a scene multiple times.
For example: app launches, shows main menu, 1st level/scene is loaded. Then I go back to main menu, and repeat. It doesnt matter which scene I load, after 4-6 times the error occurs.
Some background:
Each time when scene is loaded all the resources are released and upon first frame render - needed stuff gets loaded. The performance is more or less ok. Note that I am calling glDeleteTexture method, but I think its not doing its job and releasing memory. Thing is that -when I minimize and open it again - problem doesn't occur, but almost the same things are executed. Problem doesn't occur. This way android releases memory. How do I release/get rid of unused textures properly?
This happens on HTC Desire HD ( ice cream sandwich 4.0.4) . Other games works fine, so I bet this is not the problem in ROM.
© Stack Overflow or respective owner