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
ac26172c
Commit
ac26172c
authored
Dec 08, 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_BLENDOP to the state table.
parent
89e999ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
25 deletions
+27
-25
device.c
dlls/wined3d/device.c
+1
-24
state.c
dlls/wined3d/state.c
+26
-1
No files found.
dlls/wined3d/device.c
View file @
ac26172c
...
@@ -3459,31 +3459,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -3459,31 +3459,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_COLORKEYENABLE
:
case
WINED3DRS_COLORKEYENABLE
:
case
WINED3DRS_CLIPPLANEENABLE
:
case
WINED3DRS_CLIPPLANEENABLE
:
case
WINED3DRS_CLIPPING
:
case
WINED3DRS_CLIPPING
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_BLENDOP
:
case
WINED3DRS_BLENDOP
:
{
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
int
glParm
=
GL_FUNC_ADD
;
switch
((
WINED3DBLENDOP
)
Value
)
{
case
WINED3DBLENDOP_ADD
:
glParm
=
GL_FUNC_ADD
;
break
;
case
WINED3DBLENDOP_SUBTRACT
:
glParm
=
GL_FUNC_SUBTRACT
;
break
;
case
WINED3DBLENDOP_REVSUBTRACT
:
glParm
=
GL_FUNC_REVERSE_SUBTRACT
;
break
;
case
WINED3DBLENDOP_MIN
:
glParm
=
GL_MIN
;
break
;
case
WINED3DBLENDOP_MAX
:
glParm
=
GL_MAX
;
break
;
default:
FIXME
(
"Unrecognized/Unhandled WINED3DBLENDOP value %d
\n
"
,
Value
);
}
if
(
GL_SUPPORT
(
EXT_BLEND_MINMAX
))
{
TRACE
(
"glBlendEquation(%x)
\n
"
,
glParm
);
GL_EXTCALL
(
glBlendEquation
(
glParm
));
checkGLcall
(
"glBlendEquation"
);
}
else
{
WARN
(
"Unsupported in local OpenGL implementation: glBlendEquation
\n
"
);
}
}
break
;
break
;
case
WINED3DRS_TEXTUREFACTOR
:
case
WINED3DRS_TEXTUREFACTOR
:
...
...
dlls/wined3d/state.c
View file @
ac26172c
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION ((IWineD3DImpl *)(stateblock->wineD3DDevice->wineD3D))->gl_info
static
void
state_unknown
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
static
void
state_unknown
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
/* State which does exist, but wined3d doesn't know about */
/* State which does exist, but wined3d doesn't know about */
if
(
STATE_IS_RENDER
(
state
))
{
if
(
STATE_IS_RENDER
(
state
))
{
...
@@ -407,6 +409,29 @@ static void state_clipping(DWORD state, IWineD3DStateBlockImpl *stateblock) {
...
@@ -407,6 +409,29 @@ static void state_clipping(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
}
}
static
void
state_blendop
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
int
glParm
=
GL_FUNC_ADD
;
if
(
!
GL_SUPPORT
(
EXT_BLEND_MINMAX
))
{
WARN
(
"Unsupported in local OpenGL implementation: glBlendEquation
\n
"
);
return
;
}
switch
((
WINED3DBLENDOP
)
stateblock
->
renderState
[
WINED3DRS_BLENDOP
])
{
case
WINED3DBLENDOP_ADD
:
glParm
=
GL_FUNC_ADD
;
break
;
case
WINED3DBLENDOP_SUBTRACT
:
glParm
=
GL_FUNC_SUBTRACT
;
break
;
case
WINED3DBLENDOP_REVSUBTRACT
:
glParm
=
GL_FUNC_REVERSE_SUBTRACT
;
break
;
case
WINED3DBLENDOP_MIN
:
glParm
=
GL_MIN
;
break
;
case
WINED3DBLENDOP_MAX
:
glParm
=
GL_MAX
;
break
;
default:
FIXME
(
"Unrecognized/Unhandled D3DBLENDOP value %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_BLENDOP
]);
}
TRACE
(
"glBlendEquation(%x)
\n
"
,
glParm
);
GL_EXTCALL
(
glBlendEquation
(
glParm
));
checkGLcall
(
"glBlendEquation"
);
}
const
struct
StateEntry
StateTable
[]
=
const
struct
StateEntry
StateTable
[]
=
{
{
/* State name representative, apply function */
/* State name representative, apply function */
...
@@ -583,7 +608,7 @@ const struct StateEntry StateTable[] =
...
@@ -583,7 +608,7 @@ const struct StateEntry StateTable[] =
{
/*168, WINED3DRS_COLORWRITEENABLE */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_unknown
},
{
/*168, WINED3DRS_COLORWRITEENABLE */
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_unknown
},
{
/*169, Undefined */
0
,
state_undefined
},
{
/*169, Undefined */
0
,
state_undefined
},
{
/*170, WINED3DRS_TWEENFACTOR */
0
,
state_nogl
},
{
/*170, WINED3DRS_TWEENFACTOR */
0
,
state_nogl
},
{
/*171, WINED3DRS_BLENDOP */
STATE_RENDER
(
WINED3DRS_BLENDOP
),
state_
unknown
},
{
/*171, WINED3DRS_BLENDOP */
STATE_RENDER
(
WINED3DRS_BLENDOP
),
state_
blendop
},
{
/*172, WINED3DRS_POSITIONDEGREE */
STATE_RENDER
(
WINED3DRS_POSITIONDEGREE
),
state_unknown
},
{
/*172, WINED3DRS_POSITIONDEGREE */
STATE_RENDER
(
WINED3DRS_POSITIONDEGREE
),
state_unknown
},
{
/*173, WINED3DRS_NORMALDEGREE */
STATE_RENDER
(
WINED3DRS_NORMALDEGREE
),
state_unknown
},
{
/*173, WINED3DRS_NORMALDEGREE */
STATE_RENDER
(
WINED3DRS_NORMALDEGREE
),
state_unknown
},
/*172, WINED3DRS_POSITIONORDER */
/* Value assigned to 2 state names */
/*172, WINED3DRS_POSITIONORDER */
/* Value assigned to 2 state names */
...
...
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