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
d4c4e5d1
Commit
d4c4e5d1
authored
Feb 15, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Enable color keying only for surfaces without an alpha channel.
parent
8b8e30b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
state.c
dlls/wined3d/state.c
+12
-2
No files found.
dlls/wined3d/state.c
View file @
d4c4e5d1
...
...
@@ -337,9 +337,19 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
* used WINED3DRS_COLORKEYENABLE state(which is d3d <= 3 only). The texture function will call alpha
* in case it finds some texture+colorkeyenable combination which needs extra care.
*/
if
(
stateblock
->
textures
[
0
])
{
if
(
stateblock
->
textures
[
0
]
&&
stateblock
->
textureDimensions
[
0
]
==
GL_TEXTURE_2D
)
{
surf
=
(
IWineD3DSurfaceImpl
*
)
((
IWineD3DTextureImpl
*
)
stateblock
->
textures
[
0
])
->
surfaces
[
0
];
if
(
surf
->
CKeyFlags
&
DDSD_CKSRCBLT
)
enable_ckey
=
TRUE
;
if
(
surf
->
CKeyFlags
&
DDSD_CKSRCBLT
)
{
const
PixelFormatDesc
*
fmt
=
getFormatDescEntry
(
surf
->
resource
.
format
);
/* The surface conversion does not do color keying conversion for surfaces that have an alpha
* channel on their own. Likewise, the alpha test shouldn't be set up for color keying if the
* surface has alpha bits
*/
if
(
fmt
->
alphaMask
==
0x00000000
)
{
enable_ckey
=
TRUE
;
}
}
}
if
(
stateblock
->
renderState
[
WINED3DRS_ALPHATESTENABLE
]
||
...
...
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