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
bb564dc6
Commit
bb564dc6
authored
Dec 08, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DRS_ZENABLE to the state table.
parent
53e78895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
device.c
dlls/wined3d/device.c
+1
-20
state.c
dlls/wined3d/state.c
+21
-1
No files found.
dlls/wined3d/device.c
View file @
bb564dc6
...
...
@@ -3438,27 +3438,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
switch
(
State
)
{
case
WINED3DRS_FILLMODE
:
case
WINED3DRS_LIGHTING
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_ZENABLE
:
switch
((
WINED3DZBUFFERTYPE
)
Value
)
{
case
WINED3DZB_FALSE
:
glDisable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glDisable GL_DEPTH_TEST"
);
break
;
case
WINED3DZB_TRUE
:
glEnable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glEnable GL_DEPTH_TEST"
);
break
;
case
WINED3DZB_USEW
:
glEnable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glEnable GL_DEPTH_TEST"
);
FIXME
(
"W buffer is not well handled
\n
"
);
break
;
default:
FIXME
(
"Unrecognized WINED3DZBUFFERTYPE value %d
\n
"
,
Value
);
}
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_CULLMODE
:
...
...
dlls/wined3d/state.c
View file @
bb564dc6
...
...
@@ -94,6 +94,26 @@ static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
static
void
state_zenable
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
switch
((
WINED3DZBUFFERTYPE
)
stateblock
->
renderState
[
WINED3DRS_ZENABLE
])
{
case
WINED3DZB_FALSE
:
glDisable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glDisable GL_DEPTH_TEST"
);
break
;
case
WINED3DZB_TRUE
:
glEnable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glEnable GL_DEPTH_TEST"
);
break
;
case
WINED3DZB_USEW
:
glEnable
(
GL_DEPTH_TEST
);
checkGLcall
(
"glEnable GL_DEPTH_TEST"
);
FIXME
(
"W buffer is not well handled
\n
"
);
break
;
default:
FIXME
(
"Unrecognized D3DZBUFFERTYPE value %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_ZENABLE
]);
}
}
const
struct
StateEntry
StateTable
[]
=
{
/* State name representative, apply function */
...
...
@@ -104,7 +124,7 @@ const struct StateEntry StateTable[] =
{
/* 4, WINED3DRS_TEXTUREPERSPECTIVE */
STATE_RENDER
(
WINED3DRS_TEXTUREPERSPECTIVE
),
state_unknown
},
{
/* 5, WINED3DRS_WRAPU */
STATE_RENDER
(
WINED3DRS_WRAPU
),
state_unknown
},
{
/* 6, WINED3DRS_WRAPV */
STATE_RENDER
(
WINED3DRS_WRAPV
),
state_unknown
},
{
/* 7, WINED3DRS_ZENABLE */
STATE_RENDER
(
WINED3DRS_ZENABLE
),
state_
unknown
},
{
/* 7, WINED3DRS_ZENABLE */
STATE_RENDER
(
WINED3DRS_ZENABLE
),
state_
zenable
},
{
/* 8, WINED3DRS_FILLMODE */
STATE_RENDER
(
WINED3DRS_FILLMODE
),
state_fillmode
},
{
/* 9, WINED3DRS_SHADEMODE */
STATE_RENDER
(
WINED3DRS_SHADEMODE
),
state_unknown
},
{
/* 10, WINED3DRS_LINEPATTERN */
STATE_RENDER
(
WINED3DRS_LINEPATTERN
),
state_unknown
},
...
...
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