Mercurial > mplayer.hg
diff libvo/osx_objc_common.m @ 35094:967b0f13715c
Provide a swap buffer function for OS X.
It does not change any of the issues with double buffering.
author | reimar |
---|---|
date | Thu, 13 Sep 2012 21:46:59 +0000 |
parents | cc8276116e95 |
children | 84bb4ca7c6dd |
line wrap: on
line diff
--- a/libvo/osx_objc_common.m Thu Sep 13 21:45:14 2012 +0000 +++ b/libvo/osx_objc_common.m Thu Sep 13 21:46:59 2012 +0000 @@ -98,6 +98,11 @@ [oglv update_screen_info]; } +void vo_osx_swap_buffers(void) +{ + [oglv->glContext flushBuffer]; +} + @implementation MPCommonOpenGLView - (void) update_screen_info { @@ -126,7 +131,6 @@ - (void) preinit { - NSOpenGLContext *glContext; GLint swapInterval = 1; NSApplicationLoad(); @@ -169,11 +173,11 @@ [glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; [glContext setView:self]; [glContext makeCurrentContext]; - [glContext release]; } - (void) dealloc { + [glContext release]; [self setOpenGLContext:nil]; [super dealloc]; }