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
14a0e3f7
Commit
14a0e3f7
authored
Dec 12, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLX 1.3: pick a frame buffer configuration with matching visual
(refs #1672,
5dca2e33
)
parent
7b5c2b3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
+34
-7
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+34
-7
No files found.
modules/video_output/xcb/glx.c
View file @
14a0e3f7
...
...
@@ -260,6 +260,14 @@ static int Open (vlc_object_t *obj)
GLX_DRAWABLE_TYPE
,
GLX_WINDOW_BIT
,
None
};
xcb_get_window_attributes_reply_t
*
wa
=
xcb_get_window_attributes_reply
(
conn
,
xcb_get_window_attributes
(
conn
,
sys
->
embed
->
xid
),
NULL
);
if
(
wa
==
NULL
)
goto
error
;
xcb_visualid_t
visual
=
wa
->
visual
;
free
(
wa
);
int
nelem
;
GLXFBConfig
*
confs
=
glXChooseFBConfig
(
dpy
,
snum
,
attr
,
&
nelem
);
if
(
confs
==
NULL
)
...
...
@@ -268,22 +276,41 @@ static int Open (vlc_object_t *obj)
goto
error
;
}
/*XVisualInfo *vi = glXGetVisualFromFBConfig (dpy, confs[0]);*/
CreateWindow
(
vd
,
conn
,
depth
,
0
/* ??? */
,
width
,
height
);
/*XFree (vi);*/
GLXFBConfig
conf
;
bool
found
=
false
;
for
(
int
i
=
0
;
i
<
nelem
&&
!
found
;
i
++
)
{
conf
=
confs
[
i
];
sys
->
glwin
=
glXCreateWindow
(
dpy
,
confs
[
0
],
sys
->
window
,
NULL
);
XVisualInfo
*
vi
=
glXGetVisualFromFBConfig
(
dpy
,
conf
);
if
(
vi
==
NULL
)
continue
;
if
(
vi
->
visualid
==
visual
)
found
=
true
;
XFree
(
vi
);
}
XFree
(
confs
);
if
(
!
found
)
{
msg_Err
(
vd
,
"no matching GLX frame buffer configuration"
);
goto
error
;
}
sys
->
glwin
=
None
;
if
(
!
CreateWindow
(
vd
,
conn
,
depth
,
0
/* ??? */
,
width
,
height
))
sys
->
glwin
=
glXCreateWindow
(
dpy
,
conf
,
sys
->
window
,
NULL
);
if
(
sys
->
glwin
==
None
)
{
msg_Err
(
vd
,
"cannot create GLX window"
);
XFree
(
confs
);
goto
error
;
}
/* Create an OpenGL context */
sys
->
ctx
=
glXCreateNewContext
(
dpy
,
conf
s
[
0
]
,
GLX_RGBA_TYPE
,
NULL
,
sys
->
ctx
=
glXCreateNewContext
(
dpy
,
conf
,
GLX_RGBA_TYPE
,
NULL
,
True
);
XFree
(
confs
);
if
(
sys
->
ctx
==
NULL
)
{
msg_Err
(
vd
,
"cannot create GLX context"
);
...
...
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