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
196eaa67
Commit
196eaa67
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_STENCILFUNC.
parent
f2f59cae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
16 deletions
+38
-16
device.c
dlls/wined3d/device.c
+38
-16
No files found.
dlls/wined3d/device.c
View file @
196eaa67
...
...
@@ -3146,29 +3146,51 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
case
WINED3DRS_STENCILFUNC
:
{
int
glParm
=
GL_ALWAYS
;
int
ref
=
This
->
stateBlock
->
renderState
[
WINED3DRS_STENCILREF
];
GLint
func
;
GL
int
ref
=
This
->
stateBlock
->
renderState
[
WINED3DRS_STENCILREF
];
GLuint
mask
=
This
->
stateBlock
->
renderState
[
WINED3DRS_STENCILMASK
];
switch
((
D3DCMPFUNC
)
Value
)
{
case
D3DCMP_NEVER
:
glParm
=
GL_NEVER
;
break
;
case
D3DCMP_LESS
:
glParm
=
GL_LESS
;
break
;
case
D3DCMP_EQUAL
:
glParm
=
GL_EQUAL
;
break
;
case
D3DCMP_LESSEQUAL
:
glParm
=
GL_LEQUAL
;
break
;
case
D3DCMP_GREATER
:
glParm
=
GL_GREATER
;
break
;
case
D3DCMP_NOTEQUAL
:
glParm
=
GL_NOTEQUAL
;
break
;
case
D3DCMP_GREATEREQUAL
:
glParm
=
GL_GEQUAL
;
break
;
case
D3DCMP_ALWAYS
:
glParm
=
GL_ALWAYS
;
break
;
func
=
GL_ALWAYS
;
switch
((
D3DCMPFUNC
)
Value
)
{
case
D3DCMP_NEVER
:
func
=
GL_NEVER
;
break
;
case
D3DCMP_LESS
:
func
=
GL_LESS
;
break
;
case
D3DCMP_EQUAL
:
func
=
GL_EQUAL
;
break
;
case
D3DCMP_LESSEQUAL
:
func
=
GL_LEQUAL
;
break
;
case
D3DCMP_GREATER
:
func
=
GL_GREATER
;
break
;
case
D3DCMP_NOTEQUAL
:
func
=
GL_NOTEQUAL
;
break
;
case
D3DCMP_GREATEREQUAL
:
func
=
GL_GEQUAL
;
break
;
case
D3DCMP_ALWAYS
:
func
=
GL_ALWAYS
;
break
;
default:
FIXME
(
"Unrecognized/Unhandled D3DCMPFUNC value %ld
\n
"
,
Value
);
}
TRACE
(
"glStencilFunc with Parm=%x, ref=%d, mask=%x
\n
"
,
glParm
,
ref
,
mask
);
This
->
stencilfunc
=
glParm
;
glStencilFunc
(
glParm
,
ref
,
mask
);
checkGLcall
(
"glStencilFunc"
);
This
->
stencilfunc
=
func
;
if
(
!
This
->
stateBlock
->
renderState
[
WINED3DRS_TWOSIDEDSTENCILMODE
])
{
if
(
GL_EXTCALL
(
glStencilFuncSeparate
))
{
GL_EXTCALL
(
glStencilFuncSeparate
(
GL_FRONT
,
func
,
ref
,
mask
));
checkGLcall
(
"glStencilFuncSeparate(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)"
);
glStencilFunc
(
func
,
ref
,
mask
);
checkGLcall
(
"glStencilFunc(...)"
);
}
else
if
(
GL_EXTCALL
(
glStencilFuncSeparateATI
))
{
GL_EXTCALL
(
glStencilFuncSeparateATI
(
GL_FRONT
,
func
,
ref
,
mask
));
checkGLcall
(
"glStencilFuncSeparateATI(GL_FRONT,...)"
);
}
else
{
TRACE
(
"Separate stencil function not supported on this version of opengl"
);
glStencilFunc
(
func
,
ref
,
mask
);
checkGLcall
(
"glStencilFunc(...)"
);
}
}
else
{
glStencilFunc
(
func
,
ref
,
mask
);
checkGLcall
(
"glStencilFunc(...)"
);
}
break
;
}
case
WINED3DRS_STENCILREF
:
{
int
glParm
=
This
->
stencilfunc
;
...
...
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