1024x768 res is squashed (iPad 1, 2 and mini)

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
Contact:

1024x768 res is squashed (iPad 1, 2 and mini)

Post by DanielSefton » Sat Dec 29, 2012 3:55 am

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.
Attachments
1024x768resissue.jpg
1024x768resissue.jpg (18.77 KiB) Viewed 1591 times
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by masterfalcon » Sat Dec 29, 2012 9:11 am

Is this with GLES 1 or 2?
0 x

User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by DanielSefton » Sat Dec 29, 2012 10:19 am

It's GLES 2.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by masterfalcon » Sat Dec 29, 2012 6:54 pm

Weird. I can't reproduce it here.
0 x

User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by DanielSefton » Mon Dec 31, 2012 9:22 am

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)

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
Pass size to createRenderWindow(): 640x960, CSF 2.0 (works)

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
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...
Last edited by DanielSefton on Mon Dec 31, 2012 9:48 am, edited 1 time in total.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by masterfalcon » Mon Dec 31, 2012 9:47 am

I'm super tired right now, but I did notice that your miscParams include a 2 contentScalingFactor. Maybe that's related?
0 x

User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by DanielSefton » Mon Dec 31, 2012 9:49 am

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 :)
0 x

User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by DanielSefton » Wed Jan 02, 2013 4:35 am

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

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by masterfalcon » Wed Jan 02, 2013 7:56 am

Hmm, I'll have to try creating the window manually. I've been relying on the auto created window setup.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: 1024x768 res is squashed (iPad 1, 2 and mini)

Post by masterfalcon » Sun Jan 06, 2013 6:38 am

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);
0 x

Post Reply