Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4734d55b
Commit
4734d55b
authored
Dec 12, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/GLX: check that GLX >= 1.2 is available on the server side
parent
325ad139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+27
-1
No files found.
modules/video_output/xcb/glx.c
View file @
4734d55b
...
...
@@ -142,6 +142,27 @@ FindWindow (vout_display_t *vd, xcb_connection_t *conn,
return
screen
;
}
static
bool
CheckGLX
(
vout_display_t
*
vd
,
Display
*
dpy
)
{
int
major
,
minor
;
bool
ok
=
false
;
if
(
!
glXQueryVersion
(
dpy
,
&
major
,
&
minor
))
msg_Dbg
(
vd
,
"GLX extension not available"
);
else
if
(
major
!=
1
)
msg_Dbg
(
vd
,
"GLX extension version %d.%d unknown"
,
major
,
minor
);
else
if
(
minor
<
2
)
msg_Dbg
(
vd
,
"GLX extension version %d.%d too old"
,
major
,
minor
);
else
{
msg_Dbg
(
vd
,
"using GLX extension version %d.%d"
,
major
,
minor
);
ok
=
true
;
}
return
ok
;
}
/**
* Probe the X server.
*/
...
...
@@ -177,6 +198,9 @@ static int Open (vlc_object_t *obj)
sys
->
ctx
=
NULL
;
XSetEventQueueOwner
(
dpy
,
XCBOwnsEventQueue
);
if
(
!
CheckGLX
(
vd
,
dpy
))
goto
error
;
xcb_connection_t
*
conn
=
XGetXCBConnection
(
dpy
);
assert
(
conn
);
RegisterMouseEvents
(
obj
,
conn
,
sys
->
embed
->
xid
);
...
...
@@ -294,9 +318,11 @@ static void Close (vlc_object_t *obj)
if
(
sys
->
gl
.
sys
!=
NULL
)
vout_display_opengl_Clean
(
&
sys
->
vgl
);
glXMakeCurrent
(
dpy
,
0
,
NULL
);
if
(
sys
->
ctx
!=
NULL
)
{
glXMakeCurrent
(
dpy
,
0
,
NULL
);
glXDestroyContext
(
dpy
,
sys
->
ctx
);
}
XCloseDisplay
(
dpy
);
vout_display_DeleteWindow
(
vd
,
sys
->
embed
);
free
(
sys
);
...
...
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