Screen size/shape & view area?

Started by lawless_c, August 15, 2015, 08:45:17 PM

Previous topic - Next topic

lawless_c

Just wanted to know does the size of a screen affect the area the Camera sees?

For example , if i have world which contains multiple objects will a large screen running the same code as a device with a smaller screen simply show me a larger image?
or would a larger screen show everything exactly the same but larger?


I ask because im working on Some UI elements which exist in the world space(instead of being added to the framebuffer) and i wanted to know how difficult it would be to keep them im roughly similar positions accross devices.

EgonOlsen

For blitting, you are using absolute coordinates and so a change in device resolution causes a change in change in blitting positions relative to the screen. If you don't want that, define yourself a reference coordinate system and scale everything based on that. For example, "blit" as if your screen would be 800*480 and rescale the values accordingly before doing the actual blit operation to match your device's resolution. Keep in mind that different aspect ratios exist as well.

For 3D models, it shows the same as long as the aspect ratio remains the same. If not, it will adjust vertically by default. In other words: The horizontal field of view will always be the same, the vertical will be adjusted to prevent the rendering from distorting.
You can modify this behaviour, but this is how it's by default and that should actually be what one wants in most cases.

lawless_c

Is there a way to extract the coordinates of the image plane in world space? , I think if i have this it will all become very easy.

EgonOlsen

What for? I don't really understand the purpose... ???

lawless_c

If i can get that along with the field of views i can extrapolate where the edge of the screen is at any distance.

EgonOlsen


lawless_c