From 68dbd56eabcecaa072cdb52a38025ff1b1c8ffc8 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 29 Dec 2014 18:03:36 +0200 Subject: [PATCH] Small cleanup in i_video.mm --- src/posix/cocoa/i_video.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 4ad36b1fe..cb988002c 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -38,7 +38,6 @@ #import #import #import -#import // Avoid collision between DObject class and Objective-C #define Class ObjectClass @@ -690,7 +689,7 @@ void CocoaVideo::SetMode(const int width, const int height, const bool fullscree glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); - CGLFlushDrawable(CGLGetCurrentContext()); + [[NSOpenGLContext currentContext] flushBuffer]; static NSString* const TITLE_STRING = [NSString stringWithFormat:@"%s %s", GAMESIG, GetVersionString()]; @@ -943,7 +942,7 @@ void CocoaFrameBuffer::Flip() #endif // __LITTLE_ENDIAN__ glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, - Width, Height, 0, format, GL_UNSIGNED_BYTE, m_pixelBuffer); + Width, Height, 0, format, GL_UNSIGNED_BYTE, m_pixelBuffer); glBegin(GL_QUADS); glColor4f(1.0f, 1.0f, 1.0f, 1.0f);