Thanks for your reply. I am using iOS SDK 5.1. This is the initialization code inside of a UIViewController:
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; CGRect lFrame = [self.view bounds]; unsigned int w = lFrame.size.width; unsigned int h = lFrame.size.height; osg::ref_ptr<osg::Referenced> windata = new osgViewer::GraphicsWindowIOS::WindowData(self.view, osgViewer::GraphicsWindowIOS::WindowData::ALL_ORIENTATIONS); std::cout << "the screen Scale is: " << [[UIScreen mainScreen] scale] << std::endl; // Setup the traits parameters traits->x = 0; traits->y = 0; traits->width = w; traits->height = h; traits->depth = 16; //keep memory down, default is currently 24 //traits->alpha = 8; //traits->stencil = 8; traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; traits->setInheritedWindowPixelFormat = true; traits->inheritedWindowData = windata; // Create the Graphics Context osg::ref_ptr<osg::GraphicsContext> graphicsContext = osg::GraphicsContext::createGraphicsContext(traits.get()); _viewer = new osgViewer::Viewer(); if(graphicsContext) { _viewer->getCamera()->setGraphicsContext(graphicsContext); _viewer->getCamera()->setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); } Best regards, Robin Jörke Am 18.06.12 14:36 schrieb "Stephan Maximilian Huber" unter <ratzf...@digitalmind.de>: >Am 18.06.12 12:23, schrieb Joerke, Robin: > >> I have developed an iPad-App using osgViewer::GraphicsWindowIOS. >> When deploying to an iPad 3 with iOS 5.1, I noticed that iOS >>automatically >> upscales the graphics context by factor 2, for filling the Retina >>Display. >> However, osg still renders in a low resolution (1024x768), leading to >> aliasing artifacts. >> >> I tried to increase the rendering resolution to 2048x1536, but I could >>not >> find out how to disable the iOS upscale. This leads to the problem that >> only a quarter of the rendered image is visible. Even changing the >> contentScaleFactor property of the UIView did not help. >> >> I read about osg already supporting Retina Displays. What am I missing? > >Support for Retina-display is only available when compiling osg against >a SDK >= 4.0 > >It should work out of the box, so when you request a graphicscontext for >1024x768 you'll get a view sized 1024x768 and a graphics-context with >2048 x 1536. > >Hoy do you set up your GraphicsWindowIOS? > >cheers, >Stephan > >_______________________________________________ >osg-users mailing list >osg-users@lists.openscenegraph.org >http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org