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
1f07e4af
Commit
1f07e4af
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 blending related states to the state table.
parent
28cc3c8d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
87 deletions
+6
-87
device.c
dlls/wined3d/device.c
+6
-87
state.c
dlls/wined3d/state.c
+0
-0
No files found.
dlls/wined3d/device.c
View file @
1f07e4af
...
@@ -3445,58 +3445,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -3445,58 +3445,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_ZWRITEENABLE
:
case
WINED3DRS_ZWRITEENABLE
:
case
WINED3DRS_ZFUNC
:
case
WINED3DRS_ZFUNC
:
case
WINED3DRS_AMBIENT
:
case
WINED3DRS_AMBIENT
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_ALPHABLENDENABLE
:
case
WINED3DRS_ALPHABLENDENABLE
:
if
(
Value
)
{
glEnable
(
GL_BLEND
);
checkGLcall
(
"glEnable GL_BLEND"
);
}
else
{
glDisable
(
GL_BLEND
);
checkGLcall
(
"glDisable GL_BLEND"
);
};
break
;
case
WINED3DRS_SRCBLEND
:
case
WINED3DRS_SRCBLEND
:
case
WINED3DRS_DESTBLEND
:
case
WINED3DRS_DESTBLEND
:
{
case
WINED3DRS_ANTIALIASEDLINEENABLE
:
int
newVal
=
GL_ZERO
;
case
WINED3DRS_BLENDFACTOR
:
switch
(
Value
)
{
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
case
WINED3DBLEND_ZERO
:
newVal
=
GL_ZERO
;
break
;
case
WINED3DBLEND_ONE
:
newVal
=
GL_ONE
;
break
;
case
WINED3DBLEND_SRCCOLOR
:
newVal
=
GL_SRC_COLOR
;
break
;
case
WINED3DBLEND_INVSRCCOLOR
:
newVal
=
GL_ONE_MINUS_SRC_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHA
:
newVal
=
GL_SRC_ALPHA
;
break
;
case
WINED3DBLEND_INVSRCALPHA
:
newVal
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
WINED3DBLEND_DESTALPHA
:
newVal
=
GL_DST_ALPHA
;
break
;
case
WINED3DBLEND_INVDESTALPHA
:
newVal
=
GL_ONE_MINUS_DST_ALPHA
;
break
;
case
WINED3DBLEND_DESTCOLOR
:
newVal
=
GL_DST_COLOR
;
break
;
case
WINED3DBLEND_INVDESTCOLOR
:
newVal
=
GL_ONE_MINUS_DST_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHASAT
:
newVal
=
GL_SRC_ALPHA_SATURATE
;
break
;
case
WINED3DBLEND_BOTHSRCALPHA
:
newVal
=
GL_SRC_ALPHA
;
This
->
srcBlend
=
newVal
;
This
->
dstBlend
=
newVal
;
break
;
case
WINED3DBLEND_BOTHINVSRCALPHA
:
newVal
=
GL_ONE_MINUS_SRC_ALPHA
;
This
->
srcBlend
=
newVal
;
This
->
dstBlend
=
newVal
;
break
;
case
WINED3DBLEND_BLENDFACTOR
:
newVal
=
GL_CONSTANT_COLOR
;
break
;
case
WINED3DBLEND_INVBLENDFACTOR
:
newVal
=
GL_ONE_MINUS_CONSTANT_COLOR
;
break
;
default:
FIXME
(
"Unrecognized src/dest blend value %d (%d)
\n
"
,
Value
,
State
);
}
if
(
State
==
WINED3DRS_SRCBLEND
)
This
->
srcBlend
=
newVal
;
if
(
State
==
WINED3DRS_DESTBLEND
)
This
->
dstBlend
=
newVal
;
TRACE
(
"glBlendFunc src=%x, dst=%x
\n
"
,
This
->
srcBlend
,
This
->
dstBlend
);
glBlendFunc
(
This
->
srcBlend
,
This
->
dstBlend
);
checkGLcall
(
"glBlendFunc"
);
}
break
;
break
;
case
WINED3DRS_ALPHATESTENABLE
:
case
WINED3DRS_ALPHATESTENABLE
:
...
@@ -3723,6 +3677,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -3723,6 +3677,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_CCW_STENCILFAIL
:
case
WINED3DRS_CCW_STENCILFAIL
:
case
WINED3DRS_CCW_STENCILZFAIL
:
case
WINED3DRS_CCW_STENCILZFAIL
:
case
WINED3DRS_CCW_STENCILPASS
:
case
WINED3DRS_CCW_STENCILPASS
:
case
WINED3DRS_EDGEANTIALIAS
:
renderstate_stencil
(
This
,
State
,
Value
);
renderstate_stencil
(
This
,
State
,
Value
);
break
;
break
;
case
WINED3DRS_STENCILWRITEMASK
:
case
WINED3DRS_STENCILWRITEMASK
:
...
@@ -4186,24 +4141,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -4186,24 +4141,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
}
}
break
;
break
;
}
}
case
WINED3DRS_EDGEANTIALIAS
:
{
if
(
Value
)
{
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glEnable
(
GL_BLEND
);
checkGLcall
(
"glEnable(GL_BLEND)"
);
glEnable
(
GL_LINE_SMOOTH
);
checkGLcall
(
"glEnable(GL_LINE_SMOOTH)"
);
}
else
{
if
(
!
This
->
stateBlock
->
renderState
[
WINED3DRS_ALPHABLENDENABLE
])
{
glDisable
(
GL_BLEND
);
checkGLcall
(
"glDisable(GL_BLEND)"
);
}
glDisable
(
GL_LINE_SMOOTH
);
checkGLcall
(
"glDisable(GL_LINE_SMOOTH)"
);
}
break
;
}
case
WINED3DRS_WRAP0
:
case
WINED3DRS_WRAP0
:
case
WINED3DRS_WRAP1
:
case
WINED3DRS_WRAP1
:
case
WINED3DRS_WRAP2
:
case
WINED3DRS_WRAP2
:
...
@@ -4279,7 +4217,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -4279,7 +4217,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
}
}
break
;
break
;
}
}
case
WINED3DRS_ANTIALIASEDLINEENABLE
:
{
{
if
(
Value
)
{
if
(
Value
)
{
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
...
@@ -4295,6 +4232,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -4295,6 +4232,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
}
}
break
;
break
;
}
}
case
WINED3DRS_DEPTHBIAS
:
case
WINED3DRS_DEPTHBIAS
:
{
{
if
(
Value
)
{
if
(
Value
)
{
...
@@ -4414,25 +4352,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -4414,25 +4352,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
break
;
break
;
}
}
case
WINED3DRS_BLENDFACTOR
:
{
float
col
[
4
];
TRACE
(
"Setting BlendFactor to %d
\n
"
,
Value
);
D3DCOLORTOGLFLOAT4
(
Value
,
col
);
if
(
0xFFFFFFFF
!=
Value
)
{
glEnable
(
GL_BLEND
);
checkGLcall
(
"glEnable(GL_BLEND)"
);
}
else
{
glDisable
(
GL_BLEND
);
checkGLcall
(
"glDisable(GL_BLEND)"
);
}
glBlendColor
(
col
[
0
],
col
[
1
],
col
[
2
],
col
[
3
]);
break
;
}
case
WINED3DRS_SRGBWRITEENABLE
:
case
WINED3DRS_SRGBWRITEENABLE
:
{
{
if
(
Value
)
if
(
Value
)
...
...
dlls/wined3d/state.c
View file @
1f07e4af
This diff is collapsed.
Click to expand it.
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