Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7b6fbd28
Commit
7b6fbd28
authored
Jun 01, 2006
by
Wino Rojo
Committed by
Alexandre Julliard
Jun 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11drv: Fix for a BadMatch error.
parent
38eb9a71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
opengl.c
dlls/x11drv/opengl.c
+16
-7
No files found.
dlls/x11drv/opengl.c
View file @
7b6fbd28
...
...
@@ -554,24 +554,33 @@ XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
{
XVisualInfo
*
visual
=
NULL
;
/* In order to support OpenGL or D3D, we require a double-buffered visual and stencil buffer support, */
int
dblBuf
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
16
,
GLX_STENCIL
_SIZE
,
8
,
GLX_DOUBLEBUFFER
,
None
};
int
dblBuf
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
24
,
GLX_STENCIL_SIZE
,
8
,
GLX_ALPHA
_SIZE
,
8
,
GLX_DOUBLEBUFFER
,
None
};
if
(
!
has_opengl
())
return
NULL
;
wine_tsx11_lock
();
visual
=
pglXChooseVisual
(
display
,
DefaultScreen
(
display
),
dblBuf
);
wine_tsx11_unlock
();
if
(
visual
==
NULL
)
{
/* fallback to
no stencil
*/
int
dblBuf2
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
16
,
GLX_DOUBLEBUFFER
,
None
};
WARN
(
"Failed to get a visual with at least
8 bits of stencil
\n
"
);
/* fallback to
16 bits depth, no alpha
*/
int
dblBuf2
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
16
,
GLX_
STENCIL_SIZE
,
8
,
GLX_
DOUBLEBUFFER
,
None
};
WARN
(
"Failed to get a visual with at least
24 bits depth
\n
"
);
wine_tsx11_lock
();
visual
=
pglXChooseVisual
(
display
,
DefaultScreen
(
display
),
dblBuf2
);
wine_tsx11_unlock
();
if
(
visual
==
NULL
)
{
/* This should only happen if we cannot find a match with a depth size 16 */
FIXME
(
"Failed to find a suitable visual
\n
"
);
return
visual
;
/* fallback to no stencil */
int
dblBuf2
[]
=
{
GLX_RGBA
,
GLX_DEPTH_SIZE
,
16
,
GLX_DOUBLEBUFFER
,
None
};
WARN
(
"Failed to get a visual with at least 8 bits of stencil
\n
"
);
wine_tsx11_lock
();
visual
=
pglXChooseVisual
(
display
,
DefaultScreen
(
display
),
dblBuf2
);
wine_tsx11_unlock
();
if
(
visual
==
NULL
)
{
/* This should only happen if we cannot find a match with a depth size 16 */
FIXME
(
"Failed to find a suitable visual
\n
"
);
return
visual
;
}
}
}
TRACE
(
"Visual ID %lx Chosen
\n
"
,
visual
->
visualid
);
...
...
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