Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Using the retina display on a macbook pro

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2004
    Location
    Denmark
    Posts
    24

    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

  2. #2
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Posts
    782
    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.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2004
    Location
    Denmark
    Posts
    24
    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
  •