When my window goes fullscreen, what must I do to obtain an OpenGL rendering context (or change the existing one) for the new higher resolution view?
Right now in the window delegate I have
- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize {
return [theOpenGLView bounds].size;
}
Which is fairly pointless as I just get the same sized window on a massize linen background.
I tried returning [[NSScreen mainScreen] frame].size but this just put my OpenGL window in the corner and the rest of the screen was covered by the greyish view background. I tried updating my glViewport and projection matrix and calling [myNSOpenGLContext update] but this didn’t work either.
All the apple documentation seems to be for the old fullscreen system. I would appreciate if someone could enumerate the steps required to do this properly.
The problem was that my view wasn’t autoresizing, so although the window took up the whole screen, the view was fixed. Now I have to figure out how to make the transition not look horrendous…