Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/70552216007737344
deleted 32 characters in body
Source Link
Nate
  • 5.1k
  • 2
  • 31
  • 46

This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it twice or more one of my textures doesn't load (the texture is white).

I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)

Do I need to do any tidying up when home is pressed? I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered. I was under the impression that's all that's needed. Is there anything else (perhaps non-openGL) that needs to be cleaned up? Perhaps I'm hitting a limit of some kind

I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java.

Thanks for your help!

Ash

This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it twice or more one of my textures doesn't load (the texture is white).

I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)

Do I need to do any tidying up when home is pressed? I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered. I was under the impression that's all that's needed. Is there anything else (perhaps non-openGL) that needs to be cleaned up? Perhaps I'm hitting a limit of some kind

I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java.

Thanks for your help!

Ash

This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it twice or more one of my textures doesn't load (the texture is white).

I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)

Do I need to do any tidying up when home is pressed? I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered. I was under the impression that's all that's needed. Is there anything else (perhaps non-openGL) that needs to be cleaned up? Perhaps I'm hitting a limit of some kind

I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java.

Source Link
Ash McConnell
  • 375
  • 2
  • 3
  • 11

Android : Some textures not loading after resuming twice

This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it twice or more one of my textures doesn't load (the texture is white).

I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)

Do I need to do any tidying up when home is pressed? I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered. I was under the impression that's all that's needed. Is there anything else (perhaps non-openGL) that needs to be cleaned up? Perhaps I'm hitting a limit of some kind

I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java.

Thanks for your help!

Ash