Hi,
I'm trying to get retina support working with an embedded OSG context. I'm not
sure what to set, in order for the viewport to be 2x.
I've got the width/height values ready (and scaled according to the backing
store), but what's the right thing to set in OSG to get it to work?
I currently do this:
Code:
// scrolled, moved or resized
- (void)reshape {
// float contentsScale = self.screen.backingScaleFactor;
NSSize size_in_pixels = [self.screen convertRectToBacking:[self
bounds]].size;
if(viewer.get()) {
NSLog(@"Self Bounds: %@, contentsScale: %2.2f, pixels: %@",
NSStringFromSize([self bounds].size), self.window.backingScaleFactor,
NSStringFromSize(size_in_pixels));
viewer->getEventQueue()->windowResize(0, 0, size_in_pixels.width,
size_in_pixels.height);
viewer->getCamera()->setViewport(0, 0, size_in_pixels.width,
size_in_pixels.height);
graphicsWindow->resized(0, 0, size_in_pixels.width,
size_in_pixels.height);
but it appears to have no effect ... the scene continues to be rendered at 1/4
size in the lower left of my view. I feel I'm missing something simple!
Suggestions? (and apologies if this has been answered before. I did a search,
but found on iOS related posts).
Neil[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53397#53397
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org