-
Using the retina display on a macbook pro
Hi,
When I run a (GLUT based) OpenGL program on my retina MacBook Pro I get a window size relative to the 1440x900 resolution that is "simulated" on the retina display. That would be fine by me except that zooming in makes it clear that each pixel is actual four retina pixels, so OpenGL does not render at the true resolution.
Am I overlooking something simple?
Otherwise, I would be very interested in knowing if anyone has managed to get "retina OpenGL contexts" associated with windows and, in particular, if it is possible from GLUT (as I expect it isn't ... but who knows?). I expect I need to go with glKit?
Thanks!
Andreas
-
Advanced Member
Frequent Contributor
Go to developer.apple.com and read "High Resolution Guidelines for OS X":
https://developer.apple.com/library/...roduction.html
The "Enable OpenGL for High-Resolution Drawing" section will show you the -setWantsBestResolutionOpenGLSurface method added to NSOpenGLView.
This method is not accessible from GLUT. Or AGL.
-
Thanks!
I downloaded the CocoaGL sample from https://developer.apple.com/library/...ion/Intro.html
and inserted
[self setWantsBestResolutionOpenGLSurface:YES];
as the first statement in the method
- (void) prepareOpenGL
That worked like a charm, and the actual resolution is now exploited on the retina display.
Now ... I just need to use Cocoa for my projects instead of glut.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules