Hi all. I have a trouble with using Cocoa with OpenGL. Porblem occurs when i switch window (with NSOpenGLContext object attached) to windowed mode. I doing this by
This issue disappears only if i call
Can i find any method to determine when i must call update, and then i must not?
then i change window size by[window setHidesOnDeactivate:NO];
[window setStyleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask];
[window setTitle[NSString alloc] initWithCString:window->caption.c_str()]];
[window setLevel: NSNormalWindowLevel];
[NSMenu setMenuBarVisible:YES];
and finally I call[(NSWindow*)window setFrame:rect display:YES];
Sometimes (one case to ten) half of sreen remain covered by garbage from previous frame, and nothing can be drawn over this garbage[gl_context update];
This issue disappears only if i call
each time when i draw new frame, but this leads FPS down to 30 (from 400 without).[gl_context update];
Can i find any method to determine when i must call update, and then i must not?