Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The most important think you need to know for memory management in this case is wether to use High or low res textures. The simplest way I use is to check this</p> <pre><code>CGFloat scale = [[UIScreen mainScreen] scale]; if ((scale &gt; 1.0) || (self.view.frame.size.width &gt; 320)) { highRes = TRUE; } </code></pre> <p>This works for all devices so far and should be future proof, newer devices will use the high res. You might also calculate right there the aspect ratio (helps later on ipad vs iphone)</p> <pre><code>aspect = self.view.frame.size.width/self.view.frame.size.width </code></pre> <p>Don't load highres first it kills your apps load time, on my 3G most of my startup is spent loading (even the low res) textures, just test for this right at the beginning and don't touch the highres stuff.</p> <p>On older devices the program will die without warning due to big textures, may have something to do with de debugger not being able to trap the video memory consumption and dying itself.</p> <p>For greater optimizations consider tinting you mipmaps to check the lowest texture size that's actually being used (only if your using 3D objects).</p> <p>Forget the video RAM size issue, memory is actually shared, so you're competing for system memory, on older devices you had a MB limit for use, but it's still system memory.</p> <p>About memory management, there are many ways to do it, the simplest should be mark the textures that are loaded, and textures that are needed, when a memory warning comes, dump the textures that are loaded but not needed...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload