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
ae58e47c
Commit
ae58e47c
authored
Apr 03, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a helper function for translating blend operations.
parent
6aa02f11
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
state.c
dlls/wined3d/state.c
+23
-24
No files found.
dlls/wined3d/state.c
View file @
ae58e47c
...
...
@@ -8,7 +8,7 @@
* Copyright 2005 Oliver Stieber
* Copyright 2006 Henri Verbeet
* Copyright 2006-2008 Stefan Dösinger for CodeWeavers
* Copyright 2009-201
0
Henri Verbeet for CodeWeavers
* Copyright 2009-201
1
Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -634,6 +634,26 @@ static void state_blendop_w(DWORD state, struct wined3d_stateblock *stateblock,
WARN
(
"Unsupported in local OpenGL implementation: glBlendEquation
\n
"
);
}
static
GLenum
gl_blend_op
(
WINED3DBLENDOP
op
)
{
switch
(
op
)
{
case
WINED3DBLENDOP_ADD
:
return
GL_FUNC_ADD_EXT
;
case
WINED3DBLENDOP_SUBTRACT
:
return
GL_FUNC_SUBTRACT_EXT
;
case
WINED3DBLENDOP_REVSUBTRACT
:
return
GL_FUNC_REVERSE_SUBTRACT_EXT
;
case
WINED3DBLENDOP_MIN
:
return
GL_MIN_EXT
;
case
WINED3DBLENDOP_MAX
:
return
GL_MAX_EXT
;
default:
FIXME
(
"Unhandled blend op %#x.
\n
"
,
op
);
return
GL_NONE
;
}
}
static
void
state_blendop
(
DWORD
state
,
struct
wined3d_stateblock
*
stateblock
,
struct
wined3d_context
*
context
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
...
...
@@ -648,29 +668,8 @@ static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, st
return
;
}
switch
(
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOP
])
{
case
WINED3DBLENDOP_ADD
:
blendEquation
=
GL_FUNC_ADD_EXT
;
break
;
case
WINED3DBLENDOP_SUBTRACT
:
blendEquation
=
GL_FUNC_SUBTRACT_EXT
;
break
;
case
WINED3DBLENDOP_REVSUBTRACT
:
blendEquation
=
GL_FUNC_REVERSE_SUBTRACT_EXT
;
break
;
case
WINED3DBLENDOP_MIN
:
blendEquation
=
GL_MIN_EXT
;
break
;
case
WINED3DBLENDOP_MAX
:
blendEquation
=
GL_MAX_EXT
;
break
;
default:
FIXME
(
"Unrecognized/Unhandled D3DBLENDOP value %#x.
\n
"
,
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOP
]);
}
switch
(
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOPALPHA
])
{
case
WINED3DBLENDOP_ADD
:
blendEquationAlpha
=
GL_FUNC_ADD_EXT
;
break
;
case
WINED3DBLENDOP_SUBTRACT
:
blendEquationAlpha
=
GL_FUNC_SUBTRACT_EXT
;
break
;
case
WINED3DBLENDOP_REVSUBTRACT
:
blendEquationAlpha
=
GL_FUNC_REVERSE_SUBTRACT_EXT
;
break
;
case
WINED3DBLENDOP_MIN
:
blendEquationAlpha
=
GL_MIN_EXT
;
break
;
case
WINED3DBLENDOP_MAX
:
blendEquationAlpha
=
GL_MAX_EXT
;
break
;
default:
FIXME
(
"Unrecognized/Unhandled D3DBLENDOP value %#x
\n
"
,
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOPALPHA
]);
}
blendEquation
=
gl_blend_op
(
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOP
]);
blendEquationAlpha
=
gl_blend_op
(
stateblock
->
state
.
render_states
[
WINED3DRS_BLENDOPALPHA
]);
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_SEPARATEALPHABLENDENABLE
])
{
...
...
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