Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / iPad3, big textures & memory!

Author
Message
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th Apr 2012 16:55
So I have a 2048 x 1536 background, which the is the default size for iPad3. This texture will obviously take so much memory space.

When the same app runs on ipad2, AppGameKit will resize the display by half and all will display nicely.

But what will happen to the 2048 x 1536 image texture? Will the image still take up as much space or will it only take up memory space for 1024 x 768?
Kobaltic
12
Years of Service
User Offline
Joined: 24th Jan 2012
Location: PA, USA
Posted: 8th Apr 2012 17:28
Your texture uses the same amount of memory no matter what. If you right click on the texture and look at how much memory it uses it will always use that amount.

AGK simply scales the image to fit. If the image repeats itself then you could make a smaller image and repeat it to use less memory.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Apr 2012 23:14
If you are loading the texture up at that resolution, as Kobaltic says, it will use as much memory as a 2048x1536 image uses. If you want to use less memory, scale it down in whatever paint package you use to edit images. Be careful with images larger than 1024x1024 on phones, as I have read on these forums, that some will not be able to use images over this size.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Apr 2012 04:54
Quote: "But what will happen to the 2048 x 1536 image texture? Will the image still take up as much space or will it only take up memory space for 1024 x 768?"


Currently all iOS devices will scale images above 1024, in either direction, by halving the dimensions until they are both below 1024. This was mainly to support the old devices that had trouble with large images, but now that the iPad 3 supports such large resolutions I may add an exception for the iPad 3 that ups the limit to 2048.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Apr 2012 10:18 Edited at: 9th Apr 2012 10:19
Paul please make the option to switch this auto reduction-in-half option OFF as I need to do a Retina app for ipad3!

I think you should leave the system as it is, and make a new command to switch it off, as in the future who knows what devices come out!
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 9th Apr 2012 13:32
There is. SetResolutionMode( mode ). I think that does what you ask for.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Apr 2012 15:16
Still, as Paul said, anything over 1024 is clipped down so its still not good for Retina ipad3
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 9th Apr 2012 15:28
Ah I see, my mistake. From reading the documentation, I thought the frame buffer would be auto detected for each device. Sounds like it could do with updating in 107 then.

Login to post a reply

Server time is: 2024-05-08 17:43:34
Your offset time is: 2024-05-08 17:43:34