Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8ddb7e32
Commit
8ddb7e32
authored
Jan 21, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add separate stencil state setup via GL 2.0+ core functions.
parent
7d1203a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
directx.c
dlls/wined3d/directx.c
+4
-1
state.c
dlls/wined3d/state.c
+12
-2
No files found.
dlls/wined3d/directx.c
View file @
8ddb7e32
...
...
@@ -2889,6 +2889,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC
(
glMapBuffer
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glPointParameteri
)
/* OpenGL 1.4 */
USE_GL_FUNC
(
glPointParameteriv
)
/* OpenGL 1.4 */
USE_GL_FUNC
(
glStencilFuncSeparate
)
/* OpenGL 2.0 */
USE_GL_FUNC
(
glStencilOpSeparate
)
/* OpenGL 2.0 */
USE_GL_FUNC
(
glUnmapBuffer
)
/* OpenGL 1.5 */
#undef USE_GL_FUNC
...
...
@@ -4915,7 +4917,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
caps
->
StencilCaps
|=
WINED3DSTENCILCAPS_DECR
|
WINED3DSTENCILCAPS_INCR
;
}
if
(
gl_info
->
supported
[
EXT_STENCIL_TWO_SIDE
]
||
gl_info
->
supported
[
ATI_SEPARATE_STENCIL
])
if
(
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
]
||
gl_info
->
supported
[
EXT_STENCIL_TWO_SIDE
]
||
gl_info
->
supported
[
ATI_SEPARATE_STENCIL
])
{
caps
->
StencilCaps
|=
WINED3DSTENCILCAPS_TWOSIDED
;
}
...
...
dlls/wined3d/state.c
View file @
8ddb7e32
...
...
@@ -860,7 +860,15 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_STENCIL_TEST
);
checkGLcall
(
"glEnable GL_STENCIL_TEST"
);
if
(
gl_info
->
supported
[
EXT_STENCIL_TWO_SIDE
])
if
(
gl_info
->
supported
[
WINED3D_GL_VERSION_2_0
])
{
GL_EXTCALL
(
glStencilFuncSeparate
(
GL_FRONT
,
func
,
ref
,
mask
));
GL_EXTCALL
(
glStencilOpSeparate
(
GL_FRONT
,
stencilFail
,
depthFail
,
stencilPass
));
GL_EXTCALL
(
glStencilFuncSeparate
(
GL_BACK
,
func_ccw
,
ref
,
mask
));
GL_EXTCALL
(
glStencilOpSeparate
(
GL_BACK
,
stencilFail_ccw
,
depthFail_ccw
,
stencilPass_ccw
));
checkGLcall
(
"setting two sided stencil state"
);
}
else
if
(
gl_info
->
supported
[
EXT_STENCIL_TWO_SIDE
])
{
/* Apply back first, then front. This function calls glActiveStencilFaceEXT,
* which has an effect on the code below too. If we apply the front face
...
...
@@ -881,7 +889,9 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
checkGLcall
(
"glStencilOpSeparateATI(GL_FRONT, ...)"
);
GL_EXTCALL
(
glStencilOpSeparateATI
(
GL_BACK
,
stencilFail_ccw
,
depthFail_ccw
,
stencilPass_ccw
));
checkGLcall
(
"glStencilOpSeparateATI(GL_BACK, ...)"
);
}
else
{
}
else
{
ERR
(
"Separate (two sided) stencil not supported on this version of opengl. Caps weren't honored?
\n
"
);
}
}
...
...
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