Jump to content

  • Log In with Google      Sign In   
  • Create Account


iOS OpenGLES memory issue


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 georgepliu   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 December 2011 - 06:11 PM

I am a novice iOS OpenGLES developer and am working on a app for publication. I noticed in any of the OpenGLES code for the iPhone I've downloaded, compiled, and ran showed a continuous increase in the 'live bytes' and 'total memory' values in the Allocation Instrument of the Instruments app. Memory usage jumps (5 - 10 kb) every time a presentRenderBuffer is called, which can add up pretty fast when frames are refreshed 60 times a second. Any thoughts would be appreciate in advance.

Sponsor:

#2 SaTANO   Members   -  Reputation: 385

Like
0Likes
Like

Posted 30 December 2011 - 08:11 AM

I've never had problem with presenting render buffer but I cannot tell this should not happened on different iOS version but I think your problem should be elsewhere
Are you using device or simulator? Sometimes simulator produce some garbage
If you are sure that presenting buffer is problem than you should report bug
But first think I should try is to present render buffer in loop with no other operation (only [myView presentRenderBuffer] ) with break point at end
You should also check for event which calls your render buffer creation
If you are using iOS 5 you should also read about ARC

#3 bronxbomber92   Members   -  Reputation: 275

Like
0Likes
Like

Posted 01 January 2012 - 12:15 AM

Are you by chance creating a new framebuffer each frame accidentally? If you're drawing into a 32 bit pixel format at 480x320, that could account for the 5kb increase you're seeing. I would also try setting the

kEAGLDrawablePropertyRetainedBacking

property on your EAGLDrawable to NO.



I would agree that presentRenderBuffer is most likely not your problem. It just be might that the presentRenderBuffer triggers a context flush, so you would be seeing the effects of your previous gl* calls as well -- which means all of your GLES code should be suspect.



#4 Tachikoma   Members   -  Reputation: 552

Like
0Likes
Like

Posted 01 January 2012 - 09:44 AM

Check that you are not creating new textures and VBOs at each frame. My strategy for these kinds of issues is to divide and conquer. Comment out everything in your render code and then start enabling stuff one by one until the problem presents itself.
Latest project: Sideways Racing on the iPad




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS