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
f2f59cae
Commit
f2f59cae
authored
Mar 04, 2006
by
Vitaly Budovski
Committed by
Alexandre Julliard
Mar 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Added two sided stencil support to WINED3DRS_STENCILFAIL,
WINED3DRS_STENCILZFAIL and WINED3DRS_STENCILPASS.
parent
6bf561b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
44 deletions
+43
-44
device.c
dlls/wined3d/device.c
+43
-44
No files found.
dlls/wined3d/device.c
View file @
f2f59cae
...
...
@@ -3195,57 +3195,56 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
break
;
case
WINED3DRS_STENCILFAIL
:
{
GLenum
fail
;
GLint
zpass
;
GLint
zfail
;
fail
=
StencilOp
(
Value
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_PASS
,
&
zpass
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &zpass);"
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_FAIL
,
&
zfail
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &zfail);"
);
TRACE
(
"StencilOp fail=%x, zfail=%x, zpass=%x
\n
"
,
fail
,
zfail
,
zpass
);
glStencilOp
(
fail
,
zfail
,
zpass
);
checkGLcall
(
"glStencilOp(fail, zfail, zpass);"
);
}
break
;
case
WINED3DRS_STENCILZFAIL
:
{
GLint
fail
;
GLint
zpass
;
GLenum
zfail
;
case
WINED3DRS_STENCILPASS
:
{
GLint
stencilFail
;
GLint
depthFail
;
GLint
stencilPass
;
glGetIntegerv
(
GL_STENCIL_FAIL
,
&
fail
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_FAIL, &fail);"
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_PASS
,
&
zpass
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &zpass);"
);
zfail
=
StencilOp
(
Value
);
GLint
action
=
StencilOp
(
Value
);
TRACE
(
"StencilOp fail=%x, zfail=%x, zpass=%x
\n
"
,
fail
,
zfail
,
zpass
);
glStencilOp
(
fail
,
zfail
,
zpass
);
checkGLcall
(
"glStencilOp(fail, zfail, zpass);"
);
}
break
;
case
WINED3DRS_STENCILPASS
:
{
GLint
fail
;
GLenum
zpass
;
GLint
zfail
;
glGetIntegerv
(
GL_STENCIL_FAIL
,
&
stencilFail
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_FAIL
,
&
depthFail
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_PASS
,
&
stencilPass
);
glGetIntegerv
(
GL_STENCIL_FAIL
,
&
fail
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_FAIL, &fail);"
);
zpass
=
StencilOp
(
Value
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_FAIL
,
&
zfail
);
checkGLcall
(
"glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &zfail);"
);
if
(
WINED3DRS_STENCILFAIL
==
State
)
{
stencilFail
=
action
;
}
else
if
(
WINED3DRS_STENCILZFAIL
==
State
)
{
depthFail
=
action
;
}
else
if
(
WINED3DRS_STENCILPASS
==
State
)
{
stencilPass
=
action
;
}
TRACE
(
"StencilOp fail=%x, zfail=%x, zpass=%x
\n
"
,
fail
,
zfail
,
zpass
);
glStencilOp
(
fail
,
zfail
,
zpass
);
checkGLcall
(
"glStencilOp(fail, zfail, zpass);"
);
if
(
!
This
->
stateBlock
->
renderState
[
WINED3DRS_TWOSIDEDSTENCILMODE
])
{
if
(
GL_EXTCALL
(
glStencilOpSeparate
))
{
GL_EXTCALL
(
glStencilOpSeparate
(
GL_FRONT
,
stencilFail
,
depthFail
,
stencilPass
));
checkGLcall
(
"glStencilOpSeparate(GL_FRONT,...)"
);
}
else
if
(
GL_EXTCALL
(
glActiveStencilFaceEXT
))
{
glEnable
(
GL_STENCIL_TEST_TWO_SIDE_EXT
);
checkGLcall
(
"glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"
);
GL_EXTCALL
(
glActiveStencilFaceEXT
(
GL_FRONT
));
checkGLcall
(
"glActiveStencilFaceEXT(GL_FRONT)"
);
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
checkGLcall
(
"glStencilOp(...)"
);
}
else
if
(
GL_EXTCALL
(
glStencilOpSeparateATI
))
{
GL_EXTCALL
(
glStencilOpSeparateATI
(
GL_FRONT
,
stencilFail
,
depthFail
,
stencilPass
));
checkGLcall
(
"glStencilOpSeparateATI(GL_FRONT,...)"
);
}
else
{
TRACE
(
"Separate stencil operation not supported on this version of opengl"
);
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
checkGLcall
(
"glStencilOp(...)"
);
}
}
else
{
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
checkGLcall
(
"glStencilOp(...)"
);
}
break
;
}
case
WINED3DRS_STENCILWRITEMASK
:
{
glStencilMask
(
Value
);
...
...
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