I am unable to obtain an NSOpenGLPixelFormat pointer that includes NSOpenGLPFAFullScreen in its array of NSOpenGLPixelFormatAttributes. This is surprising as I am able to grab the full screen for OpenGL rendering when dealing directly with the CoreGraphics framework instead of going through the AppKit OpenGL abstractions.
My system is a PowerBook G4 running Mac OS X 10.2.2. The following is a simple example of code that will fail to create the described NSOpenGLPixelFormat. Any insight would be appreciated.
#import <Cocoa/Cocoa.h>
int main() {
[[NSAutoreleasePool alloc] init];
int numberOfColorBits = 24;
int numberOfAlphaBits = 8;
int numberOfDepthBits = 32;
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {NSOpenGLPFADoubleBuffer, NSOpenGLPFAColorSize, numberOfColorBits, NSOpenGLPFAAlphaSize, numberOfAlphaBits, NSOpenGLPFADepthSize, numberOfDepthBits, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAAccelerated, NSOpenGLPFAFullScreen, nil};
NSOpenGLPixelFormat* pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes

ixelFormatAttributes];
if(pixelFormat == nil) {
NSLog(@"Unable to create a pixel format for an OpenGL hardware accelerated, double-buffered renderer with at least %d bits for color, %d bits for alpha, and %d bits for depth.", numberOfColorBits, numberOfAlphaBits, numberOfDepthBits);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}