Hi Stephan >Another approach would be to use the WindowData-class to transport the >scale-factor to the view-creation code. I went this route to disable the >autorotation of the view. I think this is cleaner than adding a >"virtual" screen, which gets complicated, as the iPhone supports IMHO >external displays or an new iPad with "retina"-display gets available.
I think your'e right on this one, once i started thinking about it it got way to complicated. Adding a scale factor to the window data is the way to go I think. Especially as it turns out you can have decimal scale factors e.g. 1.5. So it's alsmost like a 'my res is full screen' indicator. i'll try do the changes today and send to you to check in to the git. Tom PS Is it best for me to send my whole git repository to you or just the files i've changed? On 25 September 2010 13:13, Thomas Hogarth <[email protected]>wrote: > Hi All > > So finally got hold of an IPod 4th gen which has the new retina display > with a res of 640x960. It does cause a bit of an issue with the iphone port > of osg however. > > For backwards compatibility reasons iOS uses points (not pixels) for it's > ui sizes. The point res of the screen is still 320x640 and is auto scaled up > to fit the new higher res screen. See link below > > > http://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10-SW11 > > > So the above states that setting the views content scale factor to two > causes the opengl buffers to be made at the true pixel size of the screen. > So in essence the new IPhone has a screen with two resolutions but you can't > change the res on the fly only change how the uikit treats your content. > > > So essentially because of the way it works the user needs to opt in for > one of the resolutions (so we know how to set the scale factor). > The easiest way to do this I thought would be to treat it as if there are > two screens one of 320x640 and one of 640x960 (IPad can also have external > displays). Then the user can select which one with the graphics traits > screenNum value. This will work but I'm not sure which should be the default > res/screen. 320x640 would be best for backward compatibility but the usual > behaviour is to have the true res as the default, right? > > > Any thoughts would be appreciated > > Tom > > > PS > > Stephan I'm making these changes to the latest git with your osgGA changes > (checked out Thursday, nice one by the way). I still need to find out how > this will effect touch coords. >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

