-(void) applicationdidfinishlaunching: (nsnotification *) anotification {
Insert code here to initialize your application
nsrect maindisplayrect = [[nsscreen mainscreen] Frame ];
Nswindow *fullscreenwindow = [[Nswindow alloc] Initwithcontentrect:maindisplayrect stylemask:nsborderlesswindowmask Backing:nsbackingstorebuffered Defer:yes];
[Fullscreenwindow setlevel:nsmainmenuwindowlevel+1];
[Fullscreenwindow Setopaque:yes];
[Fullscreenwindow Sethidesondeactivate:yes];
Nsopenglpixelformatattribute attrs[] =
{
Nsopenglpfadoublebuffer,
Kcglpfaopenglprofile,
Nsopenglprofileversion3_2core,
0
};
nsopenglpixelformat* PixelFormat = [[Nsopenglpixelformat alloc] initwithattributes:attrs];
Nsrect viewrect = nsmakerect (0.0, 0.0, mainDisplayRect.size.width, mainDisplayRect.size.height);
Myopenglview *fullscreenview = [[Myopenglview alloc] Initwithframe:viewrect Pixelformat:pixelformat];
[Fullscreenwindow Setcontentview:fullscreenview];
[Fullscreenwindow makekeyandorderfront:self];
}
Output:
2014-12-25 19:35:16.291 goldentriangle[662:20256] Opengl version:2.1 INTEL-10.0.86
2014-12-25 19:35:16.399 goldentriangle[662:20256] Opengl version:2.1 INTEL-10.0.86
2014-12-25 19:35:16.410 goldentriangle[662:20256] Opengl version:4.1 INTEL-10.0.86
OpenGL defaults to 2.1 under MAC OS X