Game Development Community

iphone gfx query

by Scott Wilson-Billing · in iTorque 2D · 01/29/2010 (10:12 am) · 2 replies

Hi,

Trying to get my head around this power of 2 stuff.

I have an image that is 480x160, is this expanded to 512x512 in video memory. The reason I ask is that I split a large 480x320 image into four separate layers (480 x 160) and performance seems to have suffered.

Cheers

#1
01/29/2010 (12:03 pm)
480 x 160 will go up to 512 x 256 (Stuff doesn't have to be square, just pow2)

Not quite sure what you mean by: "The reason I ask is that I split a large 480x320 image into four separate layers (480 x 160) and performance seems to have suffered." ?

480 x 320 would be able to be split into 2 images of 480 x 160, which once in memory would end up being 512 x 256.
#2
01/29/2010 (12:21 pm)
I had a flattened landscape image of 480 x 320 and I wanted to have the image split top/bottom with each part then having two layers to give some depth with objects moving behind stuff in the front layer, so one image became:

top : 2 images at 480 x 160 (far and near)
bottom : 2 images at 480 x 160 (far and near)

thus, originally I was using one at 512x512 and now I'm using 512x256 x 4 ?

Is this right?


Cheers