Problem with fullscreen OpenGL on Mac

Now I am transferring some OpenGL lessons from win / glut to cocoa / mac os x. In windowed mode, everything works, but when the context switches to full-screen mode, the screen may be blank (only a clear color)! For example: in the first, second, third time cube, but the fourth time the cube is not. Even if the application starts in full screen mode without sharing. I do not understand.

Xcode 3.2.1, Mac OS X 10.6.2

source link

+3
source share
1 answer

It seems that the AFController method should enterFullScreenprobably configure the OpenGL ( [scene initGL]) context .

, awakeFromNib , , , , [scene initGL]. NSApplication, applicationDidFinishLaunching: [scene initGL]. , NSOpenGLContext makeCurrentContext.

+1

Source: https://habr.com/ru/post/1734616/


All Articles