156c156 < --- > NSOpenGLContext *context; ///< OpenGL context 251a252,269 > NSOpenGLContext* CreateGLContext(int w, int h, int bpp) { > NSOpenGLPixelFormatAttribute attrs[] = { > NSOpenGLPFAFullScreen, > NSOpenGLPFADoubleBuffer, > NSOpenGLPFADepthSize, bpp, > 0 > }; > NSOpenGLContext* myContext = nil; > NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] > initWithAttributes:attrs]; > if (pixFmt != nil) { > myContext = [[NSOpenGLContext alloc] initWithFormat:pixFmt > shareContext:NO]; > } > [pixFmt release]; > return myContext; > } > 316a335,337 > this->context = CreateGLContext(w, h, bpp); > [ this->context setFullScreen ]; > [ this->context makeCurrentContext ];