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
306fcfee
Commit
306fcfee
authored
Aug 12, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: FIX D3DBLEND_BOTHSRCALPHA and BLEND_BOTHINVSRCALPHA.
parent
4baee197
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
29 deletions
+36
-29
directx.c
dlls/wined3d/directx.c
+3
-2
state.c
dlls/wined3d/state.c
+33
-27
No files found.
dlls/wined3d/directx.c
View file @
306fcfee
...
...
@@ -1934,8 +1934,6 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPBLENDCAPS_ZERO
;
*
pCaps
->
DestBlendCaps
=
WINED3DPBLENDCAPS_BLENDFACTOR
|
WINED3DPBLENDCAPS_BOTHINVSRCALPHA
|
WINED3DPBLENDCAPS_BOTHSRCALPHA
|
WINED3DPBLENDCAPS_DESTALPHA
|
WINED3DPBLENDCAPS_DESTCOLOR
|
WINED3DPBLENDCAPS_INVDESTALPHA
|
...
...
@@ -1948,6 +1946,9 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPBLENDCAPS_ZERO
;
/* NOTE: WINED3DPBLENDCAPS_SRCALPHASAT is not supported as dest blend factor,
* according to the glBlendFunc manpage
*
* WINED3DPBLENDCAPS_BOTHINVSRCALPHA and WINED3DPBLENDCAPS_BOTHSRCALPHA are
* legacy settings for srcblend only
*/
*
pCaps
->
AlphaCmpCaps
=
WINED3DPCMPCAPS_ALWAYS
|
...
...
dlls/wined3d/state.c
View file @
306fcfee
...
...
@@ -247,33 +247,6 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
return
;
};
switch
(
stateblock
->
renderState
[
WINED3DRS_SRCBLEND
])
{
case
WINED3DBLEND_ZERO
:
srcBlend
=
GL_ZERO
;
break
;
case
WINED3DBLEND_ONE
:
srcBlend
=
GL_ONE
;
break
;
case
WINED3DBLEND_SRCCOLOR
:
srcBlend
=
GL_SRC_COLOR
;
break
;
case
WINED3DBLEND_INVSRCCOLOR
:
srcBlend
=
GL_ONE_MINUS_SRC_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHA
:
srcBlend
=
GL_SRC_ALPHA
;
break
;
case
WINED3DBLEND_INVSRCALPHA
:
srcBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
WINED3DBLEND_DESTALPHA
:
srcBlend
=
GL_DST_ALPHA
;
break
;
case
WINED3DBLEND_INVDESTALPHA
:
srcBlend
=
GL_ONE_MINUS_DST_ALPHA
;
break
;
case
WINED3DBLEND_DESTCOLOR
:
srcBlend
=
GL_DST_COLOR
;
break
;
case
WINED3DBLEND_INVDESTCOLOR
:
srcBlend
=
GL_ONE_MINUS_DST_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHASAT
:
srcBlend
=
GL_SRC_ALPHA_SATURATE
;
break
;
case
WINED3DBLEND_BOTHSRCALPHA
:
srcBlend
=
GL_SRC_ALPHA
;
dstBlend
=
GL_SRC_ALPHA
;
break
;
case
WINED3DBLEND_BOTHINVSRCALPHA
:
srcBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
dstBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
WINED3DBLEND_BLENDFACTOR
:
srcBlend
=
GL_CONSTANT_COLOR
;
break
;
case
WINED3DBLEND_INVBLENDFACTOR
:
srcBlend
=
GL_ONE_MINUS_CONSTANT_COLOR
;
break
;
default:
FIXME
(
"Unrecognized src blend value %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_SRCBLEND
]);
}
switch
(
stateblock
->
renderState
[
WINED3DRS_DESTBLEND
])
{
case
WINED3DBLEND_ZERO
:
dstBlend
=
GL_ZERO
;
break
;
case
WINED3DBLEND_ONE
:
dstBlend
=
GL_ONE
;
break
;
...
...
@@ -291,12 +264,17 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
WARN
(
"Application uses SRCALPHASAT as dest blend factor, expect problems
\n
"
);
break
;
/* WINED3DBLEND_BOTHSRCALPHA and WINED3DBLEND_BOTHINVSRCALPHA are legacy source blending
* values which are still valid up to d3d9. They should not occur as dest blend values
*/
case
WINED3DBLEND_BOTHSRCALPHA
:
dstBlend
=
GL_SRC_ALPHA
;
srcBlend
=
GL_SRC_ALPHA
;
FIXME
(
"WINED3DRS_DESTBLEND = WINED3DBLEND_BOTHSRCALPHA, what to do?
\n
"
);
break
;
case
WINED3DBLEND_BOTHINVSRCALPHA
:
dstBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
srcBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
FIXME
(
"WINED3DRS_DESTBLEND = WINED3DBLEND_BOTHINVSRCALPHA, what to do?
\n
"
);
break
;
case
WINED3DBLEND_BLENDFACTOR
:
dstBlend
=
GL_CONSTANT_COLOR
;
break
;
...
...
@@ -305,6 +283,34 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
FIXME
(
"Unrecognized dst blend value %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_DESTBLEND
]);
}
switch
(
stateblock
->
renderState
[
WINED3DRS_SRCBLEND
])
{
case
WINED3DBLEND_ZERO
:
srcBlend
=
GL_ZERO
;
break
;
case
WINED3DBLEND_ONE
:
srcBlend
=
GL_ONE
;
break
;
case
WINED3DBLEND_SRCCOLOR
:
srcBlend
=
GL_SRC_COLOR
;
break
;
case
WINED3DBLEND_INVSRCCOLOR
:
srcBlend
=
GL_ONE_MINUS_SRC_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHA
:
srcBlend
=
GL_SRC_ALPHA
;
break
;
case
WINED3DBLEND_INVSRCALPHA
:
srcBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
WINED3DBLEND_DESTALPHA
:
srcBlend
=
GL_DST_ALPHA
;
break
;
case
WINED3DBLEND_INVDESTALPHA
:
srcBlend
=
GL_ONE_MINUS_DST_ALPHA
;
break
;
case
WINED3DBLEND_DESTCOLOR
:
srcBlend
=
GL_DST_COLOR
;
break
;
case
WINED3DBLEND_INVDESTCOLOR
:
srcBlend
=
GL_ONE_MINUS_DST_COLOR
;
break
;
case
WINED3DBLEND_SRCALPHASAT
:
srcBlend
=
GL_SRC_ALPHA_SATURATE
;
break
;
case
WINED3DBLEND_BOTHSRCALPHA
:
srcBlend
=
GL_SRC_ALPHA
;
dstBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
WINED3DBLEND_BOTHINVSRCALPHA
:
srcBlend
=
GL_ONE_MINUS_SRC_ALPHA
;
dstBlend
=
GL_SRC_ALPHA
;
break
;
case
WINED3DBLEND_BLENDFACTOR
:
srcBlend
=
GL_CONSTANT_COLOR
;
break
;
case
WINED3DBLEND_INVBLENDFACTOR
:
srcBlend
=
GL_ONE_MINUS_CONSTANT_COLOR
;
break
;
default:
FIXME
(
"Unrecognized src blend value %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_SRCBLEND
]);
}
if
(
stateblock
->
renderState
[
WINED3DRS_EDGEANTIALIAS
]
||
stateblock
->
renderState
[
WINED3DRS_ANTIALIASEDLINEENABLE
])
{
glEnable
(
GL_LINE_SMOOTH
);
...
...
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