If you do not want to use Objective-C, get the identifier of the display you want to display (using, for example, CGMainDisplayID ), then use CGDisplayPixelsWide and CGDisplayPixelsHigh to get the width and height of the screen in pixels. See " Retrieving Display Information" for other display information.
If you want to use a little Objective-C, just use the [[NSScreen mainScreen] frame] .
Please note that there are other problems with full screen display, namely that other applications do not do the same. Read " Drawing in full screen " in the Apple OpenGL Programming Guide for more details.
outis
source share