opengl transparent context not working in 10.11?

hi, and sorry my english


i have an OS X wich creates a fullscreen transparent window, then I initialize a transparent opengl context (code follows),

that worked from 10.5 to 10.10, but in 10.11 the opengl context is not transparent (it is completely white),

the window is ok (is transparent), any hint?


thanks in advance

Gio


//-----------------------------------------------------------------------------------------

//window code (this is ok)

dWindow = [[NSWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame]

styleMask:NSBorderlessWindowMask

backing:NSBackingStoreBuffered

defer:YES];


[dWindow setBackgroundColor:[NSColor clearColor]];

[dWindow makeKeyAndOrderFront:NSApp];

[dWindow setOpaque:NO]; //fine: the window is transparent and above all

[dWindow setLevel:NSMainMenuWindowLevel + 1];

[dWindow setIgnoresMouseEvents:YES];

//-----------------------------------------------------------------------------------------

//opengl init (this is NOT transparent, NSOpenGLCPSurfaceOpacity seems ignored


NSOpenGLPixelFormatAttribute attributes [] =

{

NSOpenGLPFANoRecovery,

NSOpenGLPFAAccelerated,

NSOpenGLPFAColorSize,32,

NSOpenGLPFADoubleBuffer,

NSOpenGLPFADepthSize,16,

0,

};


NSOpenGLPixelFormat* format = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];

glView = [[NSOpenGLView alloc] initWithFrame:[dWindow frame] pixelFormat:format];

[[dWindow contentView] addSubview:glView];

glContext = [glView openGLContext];

GLint swapInterval = 1;

GLint opacity = 0;

[glContext setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];

[glContext setValues: &opacity forParameter: NSOpenGLCPSurfaceOpacity]; //???????

[glContext makeCurrentContext];

a (strange) fix:

If I initialize the context by reducing by 1 (one) pixel respect to his fullscreen window it works on 10.11, if I use the window frame not O_o


//sample:

NSRect tempRect=[dWindow frame];

tempRect.origin.x += 1;

tempRect.origin.y += 1;

.....

glView = [[NSOpenGLView alloc] initWithFrame:tempRect pixelFormat:format];

[[dWindow contentView] addSubview:glView];

glContext = [glView openGLContext];

opengl transparent context not working in 10.11?
 
 
Q