Hello,
is there a reason why method EAGL2Window::windowMovedOrResized in OgreEAGL2Window.mm uses [mView frame] instead of [mView bounds] to calculate dimensions?
When I change the orientation of the device to landscape, the frame still returns the portrait width and height.
Tested on IPad 4 device.
[ios] window dimensions incorrect after orientation change
-
- Gnoblar
- Posts: 10
- Joined: Tue Oct 15, 2013 5:18 pm
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: [ios] window dimensions incorrect after orientation chan
What version of Ogre?
How can we reproduce the issue? It works as expected when using the sample browser for me.
How can we reproduce the issue? It works as expected when using the sample browser for me.
-
- Gnoblar
- Posts: 10
- Joined: Tue Oct 15, 2013 5:18 pm
Re: [ios] window dimensions incorrect after orientation chan
Ogre 1.9 taken from bitbucket on 11-Nov-2013.
I've just checked the current version of the file on bitbucket for 1.9 branch and the call to [mView frame] is still there. This seems to be a know issue with frames on iOS, e.g. http://stackoverflow.com/questions/2686 ... -in-iphone .
I've just checked the current version of the file on bitbucket for 1.9 branch and the call to [mView frame] is still there. This seems to be a know issue with frames on iOS, e.g. http://stackoverflow.com/questions/2686 ... -in-iphone .
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: [ios] window dimensions incorrect after orientation chan
masterfalcon wrote:How can we reproduce the issue?
-
- Gnoblar
- Posts: 10
- Joined: Tue Oct 15, 2013 5:18 pm
Re: [ios] window dimensions incorrect after orientation chan
In my case, it's calling Ogre::RenderWindow::windowMovedOrResized after the orientation has changed.
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: [ios] window dimensions incorrect after orientation chan
Are you calling windowMovedOrResized after the orientation changes?
Give me exact steps to reproduce.
Give me exact steps to reproduce.
-
- Gnoblar
- Posts: 10
- Joined: Tue Oct 15, 2013 5:18 pm
Re: [ios] window dimensions incorrect after orientation chan
yes, sorry i should have clarified that
after everything is initialized, when I detect any window size change, I also call windowMovedOrResized manually in my code.
Perhaps I am missing something obvious here, but is the call of windowMovedOrResized in such situation illegal? I noticed that samplebrowser calls it only once when initializing so that's probably why the issue with the frame vs. bounds is not visible there.
Thanks
after everything is initialized, when I detect any window size change, I also call windowMovedOrResized manually in my code.
Perhaps I am missing something obvious here, but is the call of windowMovedOrResized in such situation illegal? I noticed that samplebrowser calls it only once when initializing so that's probably why the issue with the frame vs. bounds is not visible there.
Thanks
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: [ios] window dimensions incorrect after orientation chan
Have you tried just removing that? The EAGLViewController already takes care of reconfiguring the window on orientation changes.