Lines 556-562
NSOpenGLContext* createContext(NSOpenGLContext* share,
Link Here
|
556 |
GLint zeroOpacity = 0; |
556 |
GLint zeroOpacity = 0; |
557 |
[ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; |
557 |
[ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; |
558 |
} |
558 |
} |
559 |
[ctx setView:view]; // Bug 1087: Set default framebuffer, hence enforce NSView realization |
559 |
[ctx performSelectorOnMainThread:@selector(setView) withObject:view waitUntilDone:YES]; // Bug 1087: Set default framebuffer, hence enforce NSView realization |
560 |
if( viewReadyAndLocked ) { |
560 |
if( viewReadyAndLocked ) { |
561 |
[view unlockFocus]; |
561 |
[view unlockFocus]; |
562 |
} |
562 |
} |
Lines 574-580
void setContextView(NSOpenGLContext* ctx, NSView* view) {
Link Here
|
574 |
Bool viewReadyAndLocked = lockViewIfReady(view); |
574 |
Bool viewReadyAndLocked = lockViewIfReady(view); |
575 |
DBG_PRINT("setContextView.0: ctx %p, view %p: setView: %d\n", ctx, view, viewReadyAndLocked); |
575 |
DBG_PRINT("setContextView.0: ctx %p, view %p: setView: %d\n", ctx, view, viewReadyAndLocked); |
576 |
if( viewReadyAndLocked ) { |
576 |
if( viewReadyAndLocked ) { |
577 |
[ctx setView:view]; |
577 |
[ctx performSelectorOnMainThread:@selector(setView) withObject:view waitUntilDone:YES]; |
578 |
[view unlockFocus]; |
578 |
[view unlockFocus]; |
579 |
} |
579 |
} |
580 |
} |
580 |
} |
Lines 655-661
void updateContext(NSOpenGLContext* ctx) {
Link Here
|
655 |
NSView *nsView = [ctx view]; |
655 |
NSView *nsView = [ctx view]; |
656 |
if(NULL != nsView) { |
656 |
if(NULL != nsView) { |
657 |
DBG_PRINT("updateContext.0: ctx %p, ctx.view %p\n", ctx, nsView); |
657 |
DBG_PRINT("updateContext.0: ctx %p, ctx.view %p\n", ctx, nsView); |
658 |
[ctx update]; |
658 |
[ctx performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:YES]; |
659 |
DBG_PRINT("updateContext.X\n"); |
659 |
DBG_PRINT("updateContext.X\n"); |
660 |
} |
660 |
} |
661 |
[pool release]; |
661 |
[pool release]; |