Hi,
Because of the advice in the OpenGL Programming Guide (Drawing in full screen), I tried to create a resized back buffer (described in controlling the back buffer size) instead of changing the screen resolution.
I therefore created the pixelFormatAttributes with: NSOpenGLPFABackingStore and added observers for the fullscreen notifications:
-
(void) didEnterFullScreen: (NSNotification*) notification
{
NSLog(@“didEnterFullScreen”);
const GLint dim[2] = {720, 480};
[[self openGLContext] setValues:&dim[0] forParameter:NSOpenGLCPSurfaceBackingSize];
} -
(void) didExitFullScreen: (NSNotification*) notification
{
NSLog(@“didExitFullScreen”);
CGLContextObj ctx = self.openGLContext.CGLContextObj;
CGLDisable(ctx, kCGLCESurfaceBackingSize);
}
The observers are called, the values are successfully changed (I reread them) but the new back buffer size is still ignored.
Any suggestions to solve the problem would be welcome.