Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
9a6a3a03
Commit
9a6a3a03
authored
Jan 28, 2004
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/vout.m: swap OpenGL buffers only during the vertical retrace of
the monitor (fixed flickering effect)
parent
e8350fda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+17
-3
No files found.
modules/gui/macosx/vout.m
View file @
9a6a3a03
...
...
@@ -2,7 +2,7 @@
* vout.m: MacOS X video output module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.7
2 2004/01/27 12:11:48
titer Exp $
* $Id: vout.m,v 1.7
3 2004/01/28 14:36:53
titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
...
...
@@ -33,6 +33,7 @@
#include <QuickTime/QuickTime.h>
#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
...
...
@@ -1271,12 +1272,19 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
NSOpenGLPFAAccelerated
,
NSOpenGLPFANoRecovery
,
NSOpenGLPFADoubleBuffer
,
NSOpenGLPFAWindow
,
0
};
NSOpenGLPixelFormat
*
fmt
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes:
attribs
];
if
(
!
fmt
)
{
fprintf
(
stderr
,
"Cannot create NSOpenGLPixelFormat
\n
"
);
return
self
;
}
self
=
[
super
initWithFrame
:
frame
pixelFormat
:
fmt
];
[[
self
openGLContext
]
makeCurrentContext
];
...
...
@@ -1296,7 +1304,8 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
{
[[
self
openGLContext
]
update
];
NSRect
bounds
=
[
self
bounds
];
glViewport
(
0
,
0
,
(
GLint
)
bounds
.
size
.
width
,
(
GLint
)
bounds
.
size
.
height
);
glViewport
(
0
,
0
,
(
GLint
)
bounds
.
size
.
width
,
(
GLint
)
bounds
.
size
.
height
);
}
-
(
void
)
drawRect
:(
NSRect
)
rect
...
...
@@ -1305,10 +1314,15 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
id
o_window
=
[
self
window
];
p_vout
=
(
vout_thread_t
*
)[
o_window
getVout
];
/* Make this current context */
[[
self
openGLContext
]
makeCurrentContext
];
/* http://developer.apple.com/documentation/GraphicsImaging/
Conceptual/OpenGL/chap5/chapter_5_section_44.html */
long
params
[]
=
{
1
};
CGLSetParameter
(
CGLGetCurrentContext
(),
kCGLCPSwapInterval
,
params
);
/* Black background */
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment