Sync swap with VBL.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15611 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nplourde 2005-06-02 12:03:26 +00:00
parent 1adaa6b62f
commit 994a2b2479
1 changed files with 2 additions and 0 deletions

View File

@ -298,6 +298,7 @@ static uint32_t control(uint32_t request, void *data, ...)
@implementation CustomOpenGLView
- (void) initOpenGLView
{
long swapInterval = 1;
NSRect frame = [self frame];
CVReturn error = kCVReturnSuccess;
@ -323,6 +324,7 @@ static uint32_t control(uint32_t request, void *data, ...)
[window makeKeyAndOrderFront:self];
[self setOpenGLContext:glContext];
[[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
[glContext setView:self];
[glContext makeCurrentContext];