156c156 < --- > NSOpenGLContext *context; ///< OpenGL context 251a252,272 > 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; > } > > void DestroyGLContext() { > free(this->context); > this->context = NULL; > } 316a338,340 > this->context = CreateGLContext(w, h, bpp); > [ this->context setFullScreen ]; > [ this->context makeCurrentContext ]; 418a443,444 > > DestroyGLContext();