How much can I stuff in to video ram? (on iPhone/iPod touch)
Hello,
Current iPhone project I'm working on, is using quite a bit of texture area; that's all in video ram.
Anyone know how many MB of video ram is available to an iPhone app?
Also, what's the maximum texture size?
Thanks,
Current iPhone project I'm working on, is using quite a bit of texture area; that's all in video ram.
Anyone know how many MB of video ram is available to an iPhone app?
Also, what's the maximum texture size?
Thanks,
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
(Aug 5, 2010 06:30 AM)Jamie W Wrote: Also, what's the maximum texture size?MBX (iPhone 3G and earlier): 1024x1024
SGX (iPhone 3GS/4): 2048x2048
You'll find more information about the video chipset limitations on Apples OpenGL ES Programming Guide for iOS: Platform Notes and Best Practices for Working with Texture Data.
Remember, texture compression (PVRTC) is your best friend when it comes to memory savings and draw performance on the iPhone.
The Monkey Hustle - Now available on the App Store!
Ah yeh, many thanks for the info mario.
I tried PVRTC before, and for textures with any alpha pixels, they didn't look so good! Looks like I'll be sticking to 1024*1024 for my texture atlases then. Using either 2bpp or 4bpp (ARGB8888) as needed.
Any thoughts on how many I can fit in to video memory at the same time?
I tried PVRTC before, and for textures with any alpha pixels, they didn't look so good! Looks like I'll be sticking to 1024*1024 for my texture atlases then. Using either 2bpp or 4bpp (ARGB8888) as needed.Any thoughts on how many I can fit in to video memory at the same time?
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
(Aug 5, 2010 07:49 AM)Jamie W Wrote: I tried PVRTC before, and for textures with any alpha pixels, they didn't look so good!
I've just used PVRTC with alpha cutouts (glAlphaFunc) and had no problems. Make sure your using the correct blend mode though - in my case it was glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) although I have seen other forum posts note it as non-premultiplied. Might be due to my source material though.
(Aug 5, 2010 07:49 AM)Jamie W Wrote: Any thoughts on how many I can fit in to video memory at the same time?
From the Platform Notes you'll find the following notes:
Quote:OpenGL ES applications targeting the PowerVR MBX must limit themselves to no more than 24 MB of memory for textures and renderbuffers. Overall, the PowerVR MBX is more sensitive to memory usage, and your application should minimize the size of textures and renderbuffers.
I haven't seen any similar recommendation for the SGX chipset.
The Monkey Hustle - Now available on the App Store!
You can reduce the smudged alpha when using PVRTC considerable by bleeding the edge colors out into the transparent pixels. Not easy to do in photoshop though.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Is it possible with PVR textures, to have a seperate source for the Alpha? So like a solid Alpha, PVR; and also, a separate 8 or 4 bit-per-pixel Alpha channel, loaded in from a seperate file?
Also, would the 24mb limit be applicable to all iPhones / iPod touchs? Perhaps newer devices have more video ram? But 24mb is a good amount to work to (some devices may have more, but, it will never be less than 24mb), is that correct?
Thanks again,
Jamie.
Also, would the 24mb limit be applicable to all iPhones / iPod touchs? Perhaps newer devices have more video ram? But 24mb is a good amount to work to (some devices may have more, but, it will never be less than 24mb), is that correct?
Thanks again,
Jamie.
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
Sure, if you set up multi-texturing you can pull the alpha from a separate texture. It's a bit involved to set up though.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
(Aug 5, 2010 12:17 PM)Jamie W Wrote: Also, would the 24mb limit be applicable to all iPhones / iPod touchs? Perhaps newer devices have more video ram?
The MBX chipset is found in all the older iPhone and iPod touch devices. iPhone 3GS and later use the SGX chipset - and I would naturally assume they have less restrictions, although I can't find any documentation verifying my assumption.
The Monkey Hustle - Now available on the App Store!
Ah, thanks again for the replies chaps.
Just one more questions; the 24MB, is that for texture usage only, or is it all combined with other ram usage (program code, buffers, etc)? Thanks again.
Just one more questions; the 24MB, is that for texture usage only, or is it all combined with other ram usage (program code, buffers, etc)? Thanks again.
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
The Apple Platform Notes state that the 24MB limit is in respect to OpenGL ES memory usage (textures, buffers etc.)... BUT, you'll most likely hit a system memory warning on older devices long before you hit this limit!
Just be smart about memory usage and minimise concurrent amount of memory. I use lightweight handles to reference all my resources (textures, sound buffers etc.) and load the resource only when it is bound. All loaded resource are kept cached till I receive a memory warning - and are then flushed.
This works great for my usage and is easy to implement. You can also be more creative about the implementation for your specific use and level design.
Just be smart about memory usage and minimise concurrent amount of memory. I use lightweight handles to reference all my resources (textures, sound buffers etc.) and load the resource only when it is bound. All loaded resource are kept cached till I receive a memory warning - and are then flushed.
This works great for my usage and is easy to implement. You can also be more creative about the implementation for your specific use and level design.
The Monkey Hustle - Now available on the App Store!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Pause/Resume on IPod touch | tonysameh | 0 | 2,037 |
Jul 26, 2010 06:34 AM Last Post: tonysameh |
|
| iPod Touch not multitasking not working??? | Toontingy | 1 | 3,512 |
Jun 24, 2010 04:13 PM Last Post: sealfin |
|
| iPhone Only? Not for iPod Touch? | daveh84 | 4 | 3,724 |
May 7, 2010 10:46 PM Last Post: cmiller |
|
| Lets make a living at this stuff, dang it!!! | zel58 | 15 | 5,962 |
Apr 21, 2010 12:32 PM Last Post: cmiller |
|
| Detecting hardware, which iPhone/iPod I'm running on? | Jamie W | 9 | 6,721 |
Apr 13, 2010 11:27 AM Last Post: Frank C. |
|

