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?
Go to developer.apple.com and read “High Resolution Guidelines for OS X”:
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.
I downloaded the CocoaGL sample from https://developer.apple.com/library/mac/#samplecode/CocoaGL/Introduction/Intro.html
as the first statement in the method
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.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.