Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b23bbc5d
Commit
b23bbc5d
authored
Jun 02, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set swap interval to 1 in glx when possible.
It avoids tearing.
parent
fb044d45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+19
-0
No files found.
modules/video_output/xcb/glx.c
View file @
b23bbc5d
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <xcb/xcb.h>
#include <xcb/xcb.h>
#include <X11/Xlib-xcb.h>
#include <X11/Xlib-xcb.h>
#include <GL/glx.h>
#include <GL/glx.h>
#include <GL/glxext.h>
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
...
@@ -359,6 +360,24 @@ static int Open (vlc_object_t *obj)
...
@@ -359,6 +360,24 @@ static int Open (vlc_object_t *obj)
sys
->
glwin
=
sys
->
window
;
sys
->
glwin
=
sys
->
window
;
}
}
const
char
*
glx_extensions
=
glXQueryExtensionsString
(
dpy
,
snum
);
bool
is_swap_interval_set
=
false
;
#ifdef GLX_SGI_swap_control
if
(
strstr
(
glx_extensions
,
"GLX_SGI_swap_control"
))
{
PFNGLXSWAPINTERVALSGIPROC
SwapIntervalSGI
=
(
PFNGLXSWAPINTERVALSGIPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalSGI"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalSGI
)
is_swap_interval_set
=
!
SwapIntervalSGI
(
1
);
}
#endif
#ifdef GLX_EXT_swap_control
if
(
strstr
(
glx_extensions
,
"GLX_EXT_swap_control"
))
{
PFNGLXSWAPINTERVALEXTPROC
SwapIntervalEXT
=
(
PFNGLXSWAPINTERVALEXTPROC
)
GetProcAddress
(
NULL
,
"glXSwapIntervalEXT"
);
if
(
!
is_swap_interval_set
&&
SwapIntervalEXT
)
is_swap_interval_set
=
!
SwapIntervalEXT
(
dpy
,
sys
->
glwin
,
1
);
}
#endif
/* Initialize common OpenGL video display */
/* Initialize common OpenGL video display */
sys
->
gl
.
lock
=
NULL
;
sys
->
gl
.
lock
=
NULL
;
sys
->
gl
.
unlock
=
NULL
;
sys
->
gl
.
unlock
=
NULL
;
...
...
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