Basically, for any 1024x768 device (iPad 1, 2, mini - retina iPads are no problem), it looks like the attached image. The viewport is squashed. The FOV also looks freaky when I rotate the camera.
I don't recall changing anything in my app that could have caused this (there might be), but I did also upgrade Ogre in the last couple of months or so (latest 1.8 branch) and it didn't happen prior to that.
Does anyone else have this issue? Or are there any suggestions as to what might be happening and how to work around it?
Thanks in advance.
1024x768 res is squashed (iPad 1, 2 and mini)
-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
1024x768 res is squashed (iPad 1, 2 and mini)
You do not have the required permissions to view the files attached to this post.
-
- OGRE Retired Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
Is this with GLES 1 or 2?
-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
-
- OGRE Retired Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
Weird. I can't reproduce it here.
-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
Just found out that it occurs if I create a render window at a non-retina size, regardless of the content scaling factor. So it happens on all non-retina devices, and retina devices if I provide a non-retina size.
What sizes do you pass to createRenderWindow()?
Pass size to createRenderWindow(): 320x480, CSF 1.0 (squashed)
Pass size to createRenderWindow(): 640x960, CSF 2.0 (works)
It doesn't seem related, but I find it odd that the viewport size is 1, and the render window width/height is 1920x1280 when passing a retina size...
What sizes do you pass to createRenderWindow()?
Pass size to createRenderWindow(): 320x480, CSF 1.0 (squashed)
Code: Select all
GLES2RenderSystem::_createRenderWindow "DefaultRenderWindow", 320x480 fullscreen miscParams: contentScalingFactor=1 externalViewControllerHandle=496159184
iOS: Using an external view controller handle
iOS: Window created 320 x 480 with backing store size 640 x 960 using content scaling factor 1.0
- 00:17:35.448 INFO: viewport->getWidth() x viewport->getHeight(): 1x1
- 00:17:35.448 INFO: renderWindow->getWidth() x renderWindow->getHeight(): 960x640
Code: Select all
GLES2RenderSystem::_createRenderWindow "DefaultRenderWindow", 640x960 fullscreen miscParams: contentScalingFactor=2 externalViewControllerHandle=529713520
iOS: Using an external view controller handle
iOS: Window created 320 x 480 with backing store size 640 x 960 using content scaling factor 2.0
- 00:11:15.387 INFO: viewport->getWidth() x viewport->getHeight(): 1x1
- 00:11:15.387 INFO: renderWindow->getWidth() x renderWindow->getHeight(): 1920x1280
Last edited by DanielSefton on Mon Dec 31, 2012 9:48 am, edited 1 time in total.
-
- OGRE Retired Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
I'm super tired right now, but I did notice that your miscParams include a 2 contentScalingFactor. Maybe that's related?
-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
Sorry I meant to edit that, the log is from when I tried it with CSF 2.0 as well, but exactly the same happens with 1.0.
Also: get some sleep
Also: get some sleep

-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
So yeah, I managed to work around this by passing values to createWindow() as if it's a retina device regardless of whether it is or not.
*shrugs*
*shrugs*
-
- OGRE Retired Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
Hmm, I'll have to try creating the window manually. I've been relying on the auto created window setup.
-
- OGRE Retired Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: 1024x768 res is squashed (iPad 1, 2 and mini)
I tried creating a window manually but it isn't squashed for me. My guess is that the external view controller is messing it up. Here's my creation code:
Code: Select all
Ogre::NameValuePairList miscParams;
miscParams["contentScalingFactor"] = Ogre::StringConverter::toString((unsigned long)1.0);
res = mRoot->createRenderWindow("OGRE Sample Browser Window", 768, 1024, false, &miscParams);