CLOSED [iOS] EAGL2Support::addConfig and orientation?

Minor issues with the Ogre API that can be trivial to fix
Post Reply
simedj
Goblin
Posts: 262
Joined: Fri Nov 18, 2011 6:50 pm
x 3

CLOSED [iOS] EAGL2Support::addConfig and orientation?

Post by simedj »

https://bitbucket.org/sinbad/ogre/src/4 ... ault#cl-52

Code: Select all

        CGSize screenSize = [[UIScreen mainScreen] bounds].size;

        optVideoMode.name = "Video Mode";
        optVideoMode.possibleValues.push_back("320 x 480");
        optVideoMode.possibleValues.push_back("320 x 568");
        optVideoMode.possibleValues.push_back("768 x 1024");
        optVideoMode.currentValue = StringConverter::toString(screenSize.width) + " x " + 
                                    StringConverter::toString(screenSize.height);
The hard-coded values (which look dodgy anyway) and thereturned screenSize value are all portrait. If your app is running in landscape mode, you get logs like this:
GLES2RenderSystem::_createRenderWindow "", 320x480 windowed miscParams: FSAA=0 Full Screen=No hidden=true title=C-Arm Trainer
iOS: Window created 320 x 480 with backing store size 480 x 320 using content scaling factor 1.0
I can't tell if this is a problem or not...
Last edited by simedj on Fri Mar 07, 2014 9:22 am, edited 1 time in total.
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [iOS] Should EAGL2Support::addConfig() respect orientati

Post by masterfalcon »

No, those resolutions are only the resolution of the window in portrait. Which is what the iPhone/iPod default to. Though the resolution may be in portrait, the View Controller actually decides what orientation the view is in and recreates the backing store to match said orientation. It also handles changing the origin of the coordinate system to match what you would expect for how the screen is oriented.
Post Reply