156c156 < NSOpenGLContext *context; ///< OpenGL context --- > 252,272d251 < 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; < } 338,340d316 < this->context = CreateGLContext(w, h, bpp); < [ this->context setFullScreen ]; < [ this->context makeCurrentContext ]; 443,444d418 < < DestroyGLContext();