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
4c64b86f
Commit
4c64b86f
authored
Dec 10, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DRS_COLORWRITEENABLEx to the state table.
parent
caa371a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
29 deletions
+33
-29
device.c
dlls/wined3d/device.c
+4
-25
state.c
dlls/wined3d/state.c
+29
-4
No files found.
dlls/wined3d/device.c
View file @
4c64b86f
...
...
@@ -3399,24 +3399,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_POINTSCALE_B
:
case
WINED3DRS_POINTSCALE_C
:
case
WINED3DRS_POINTSCALEENABLE
:
case
WINED3DRS_COLORWRITEENABLE
:
case
WINED3DRS_COLORWRITEENABLE1
:
case
WINED3DRS_COLORWRITEENABLE2
:
case
WINED3DRS_COLORWRITEENABLE3
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_COLORWRITEENABLE
:
{
TRACE
(
"Color mask: r(%d) g(%d) b(%d) a(%d)
\n
"
,
Value
&
WINED3DCOLORWRITEENABLE_RED
?
1
:
0
,
Value
&
WINED3DCOLORWRITEENABLE_GREEN
?
1
:
0
,
Value
&
WINED3DCOLORWRITEENABLE_BLUE
?
1
:
0
,
Value
&
WINED3DCOLORWRITEENABLE_ALPHA
?
1
:
0
);
glColorMask
(
Value
&
WINED3DCOLORWRITEENABLE_RED
?
GL_TRUE
:
GL_FALSE
,
Value
&
WINED3DCOLORWRITEENABLE_GREEN
?
GL_TRUE
:
GL_FALSE
,
Value
&
WINED3DCOLORWRITEENABLE_BLUE
?
GL_TRUE
:
GL_FALSE
,
Value
&
WINED3DCOLORWRITEENABLE_ALPHA
?
GL_TRUE
:
GL_FALSE
);
checkGLcall
(
"glColorMask(...)"
);
}
break
;
case
WINED3DRS_LOCALVIEWER
:
{
GLint
state
=
(
Value
)
?
1
:
0
;
...
...
@@ -3677,16 +3666,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
break
;
}
case
WINED3DRS_COLORWRITEENABLE1
:
case
WINED3DRS_COLORWRITEENABLE2
:
case
WINED3DRS_COLORWRITEENABLE3
:
{
/* depends on WINED3DRS_COLORWRITEENABLE. */
if
(
0x0000000F
!=
Value
)
ERR
(
"(%p)->(%s,%d) not yet implemented. Missing of cap D3DPMISCCAPS_INDEPENDENTWRITEMASKS wasn't honored?
\n
"
,
This
,
debug_d3drenderstate
(
State
),
Value
);
break
;
}
case
WINED3DRS_SRGBWRITEENABLE
:
{
if
(
Value
)
...
...
dlls/wined3d/state.c
View file @
4c64b86f
...
...
@@ -1001,6 +1001,31 @@ static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
static
void
state_colorwrite
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
DWORD
Value
=
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE
];
TRACE
(
"Color mask: r(%d) g(%d) b(%d) a(%d)
\n
"
,
Value
&
D3DCOLORWRITEENABLE_RED
?
1
:
0
,
Value
&
D3DCOLORWRITEENABLE_GREEN
?
1
:
0
,
Value
&
D3DCOLORWRITEENABLE_BLUE
?
1
:
0
,
Value
&
D3DCOLORWRITEENABLE_ALPHA
?
1
:
0
);
glColorMask
(
Value
&
D3DCOLORWRITEENABLE_RED
?
GL_TRUE
:
GL_FALSE
,
Value
&
D3DCOLORWRITEENABLE_GREEN
?
GL_TRUE
:
GL_FALSE
,
Value
&
D3DCOLORWRITEENABLE_BLUE
?
GL_TRUE
:
GL_FALSE
,
Value
&
D3DCOLORWRITEENABLE_ALPHA
?
GL_TRUE
:
GL_FALSE
);
checkGLcall
(
"glColorMask(...)"
);
/* depends on WINED3DRS_COLORWRITEENABLE. */
if
(
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE1
]
!=
0x0000000F
||
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE2
]
!=
0x0000000F
||
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE3
]
!=
0x0000000F
)
{
ERR
(
"(WINED3DRS_COLORWRITEENABLE1/2/3,%d,%d,%d) not yet implemented. Missing of cap D3DPMISCCAPS_INDEPENDENTWRITEMASKS wasn't honored?
\n
"
,
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE1
],
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE2
],
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE3
]);
}
}
const
struct
StateEntry
StateTable
[]
=
{
/* State name representative, apply function */
...
...
@@ -1174,7 +1199,7 @@ const struct StateEntry StateTable[] =
{
/*165, WINED3DRS_DEBUGMONITORTOKEN */
STATE_RENDER
(
WINED3DRS_DEBUGMONITORTOKEN
),
state_unknown
},
{
/*166, WINED3DRS_POINTSIZE_MAX */
STATE_RENDER
(
WINED3DRS_POINTSIZE_MAX
),
state_psizemax
},
{
/*167, WINED3DRS_INDEXEDVERTEXBLENDENABLE */
0
,
state_nogl
},
{
/*168, WINED3DRS_COLORWRITEENABLE */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
unknown
},
{
/*168, WINED3DRS_COLORWRITEENABLE */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
colorwrite
},
{
/*169, Undefined */
0
,
state_undefined
},
{
/*170, WINED3DRS_TWEENFACTOR */
0
,
state_nogl
},
{
/*171, WINED3DRS_BLENDOP */
STATE_RENDER
(
WINED3DRS_BLENDOP
),
state_blendop
},
...
...
@@ -1198,9 +1223,9 @@ const struct StateEntry StateTable[] =
{
/*187, WINED3DRS_CCW_STENCILZFAIL */
STATE_RENDER
(
WINED3DRS_STENCILENABLE
),
state_stencil
},
{
/*188, WINED3DRS_CCW_STENCILPASS */
STATE_RENDER
(
WINED3DRS_STENCILENABLE
),
state_stencil
},
{
/*189, WINED3DRS_CCW_STENCILFUNC */
STATE_RENDER
(
WINED3DRS_STENCILENABLE
),
state_stencil
},
{
/*190, WINED3DRS_COLORWRITEENABLE1 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
unknown
},
{
/*191, WINED3DRS_COLORWRITEENABLE2 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
unknown
},
{
/*192, WINED3DRS_COLORWRITEENABLE3 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
unknown
},
{
/*190, WINED3DRS_COLORWRITEENABLE1 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
colorwrite
},
{
/*191, WINED3DRS_COLORWRITEENABLE2 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
colorwrite
},
{
/*192, WINED3DRS_COLORWRITEENABLE3 */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_
colorwrite
},
{
/*193, WINED3DRS_BLENDFACTOR */
STATE_RENDER
(
WINED3DRS_ALPHABLENDENABLE
),
state_blend
},
{
/*194, WINED3DRS_SRGBWRITEENABLE */
0
,
state_nogl
},
{
/*195, WINED3DRS_DEPTHBIAS */
STATE_RENDER
(
WINED3DRS_DEPTHBIAS
),
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