Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setFullScreen returning 'invalid drawable'




Hello

I am trying to use [NSOpenGLContext setFullScreen] in my graphics compositing app. The call to setFullScreen returns 'invalid drawable'... the screen does go black but nothing further is drawn.

The NSOpenGLPixelFormatAttribute does match my sharedContext. If I don't include NSOpenGLPFAAllRenderers, the call to initalize the fullscreen context fails, which I'm not sure should be the case.

Any idea where I'm going wrong?

Thanks

Nick


NSOpenGLPixelFormatAttribute attrs[] = {
NSOpenGLPFAColorSize, 32,
NSOpenGLPFAAlphaSize, 8,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFAScreenMask, CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay),
NSOpenGLPFAAllRenderers, 0,
NSOpenGLPFAFullScreen,
NSOpenGLPFANoRecovery,
NSOpenGLPFAAccelerated,
NSOpenGLPFADoubleBuffer,
0
};


NSOpenGLPixelFormat *pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];




_fullScreenContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:[_glView openGLContext]];


[pixelFormat release];
pixelFormat = nil;




err = CGCaptureAllDisplays();
if (err != CGDisplayNoErr) {
[_fullScreenContext release];
_fullScreenContext = nil;
return;
}


[_fullScreenContext setFullScreen]; //returns invalid drawable
[_fullScreenContext makeCurrentContext];

.....


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.