Hi,
I simply move my glView from the current window to a full screen window
without changing anything else in the glView. It works in the big window
but, when I come back to the small window I get a white content. The glView
is still there, I can click on it and it works, but I cannot see anything.
Do you know why? Please note that the glView is retained since I created it
with alloc + init.
To go to the big Window
------------------------
gBigWindow = [[SBBigWindow alloc] initWithContentRect:screenFrame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO screen:theScreen];
[gBigWindow setDelegate:self];
[gBigWindow setReleasedWhenClosed:NO];
[gBigWindow setBackgroundColor:[NSColor blackColor]];
[gBigWindow setLevel:NSScreenSaverWindowLevel];
[[gBigWindow contentView] setAutoresizesSubviews:YES];
[glView removeFromSuperviewWithoutNeedingDisplay];
[glView setFrameOrigin:newOrigin];
[gSmallWindow orderOut:self];
[[gBigWindow contentView] addSubview:glView];
[gBigWindow makeKeyAndOrderFront:self];
[gBigWindow makeFirstResponder:glView];
[gBigWindow setViewsNeedDisplay:YES];
To go back to the small window
-----------------------
[gBigWindow close];
[gBigWindow release];
gBigWindow = nil;
[glView setFrameOrigin:NSMakePoint(0.0, 0.0)];
[[gSmallWindow contentView] addSubview:glView];
[gSmallWindow reshape];
[gSmallWindow setIsVisible:YES];
[gSmallWindow makeKeyAndOrderFront:self];
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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