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

CLOSED [iOS] EAGL2Support::addConfig and orientation?

Post by simedj » Sat Feb 22, 2014 5:21 pm

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.
0 x
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
Contact:

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

Post by masterfalcon » Tue Feb 25, 2014 2:12 am

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.
0 x

Post Reply