Commit d6245409 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: D3DRS_BLENDFACTOR should not influence glBlend(TRUE/FALSE).

parent bc904582
...@@ -208,14 +208,11 @@ static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock) { ...@@ -208,14 +208,11 @@ static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock) {
static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock) { static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock) {
int srcBlend = GL_ZERO; int srcBlend = GL_ZERO;
int dstBlend = GL_ZERO; int dstBlend = GL_ZERO;
float col[4];
/* GL_LINE_SMOOTH needs GL_BLEND to work, according to the red book, and special blending params */ /* GL_LINE_SMOOTH needs GL_BLEND to work, according to the red book, and special blending params */
/* TODO: Is enabling blending really affected by the blendfactor??? */
if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE] || if (stateblock->renderState[WINED3DRS_ALPHABLENDENABLE] ||
stateblock->renderState[WINED3DRS_EDGEANTIALIAS] || stateblock->renderState[WINED3DRS_EDGEANTIALIAS] ||
stateblock->renderState[WINED3DRS_ANTIALIASEDLINEENABLE] || stateblock->renderState[WINED3DRS_ANTIALIASEDLINEENABLE]) {
stateblock->renderState[WINED3DRS_BLENDFACTOR] != 0xFFFFFFFF) {
glEnable(GL_BLEND); glEnable(GL_BLEND);
checkGLcall("glEnable GL_BLEND"); checkGLcall("glEnable GL_BLEND");
} else { } else {
...@@ -303,6 +300,10 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock) { ...@@ -303,6 +300,10 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock) {
/* TODO: Remove when state management done */ /* TODO: Remove when state management done */
stateblock->wineD3DDevice->dstBlend = dstBlend; stateblock->wineD3DDevice->dstBlend = dstBlend;
stateblock->wineD3DDevice->srcBlend = srcBlend; stateblock->wineD3DDevice->srcBlend = srcBlend;
}
static void state_blendfactor(DWORD state, IWineD3DStateBlockImpl *stateblock) {
float col[4];
TRACE("Setting BlendFactor to %d\n", stateblock->renderState[WINED3DRS_BLENDFACTOR]); TRACE("Setting BlendFactor to %d\n", stateblock->renderState[WINED3DRS_BLENDFACTOR]);
D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_BLENDFACTOR], col); D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_BLENDFACTOR], col);
...@@ -1961,7 +1962,7 @@ const struct StateEntry StateTable[] = ...@@ -1961,7 +1962,7 @@ const struct StateEntry StateTable[] =
{ /*190, WINED3DRS_COLORWRITEENABLE1 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite }, { /*190, WINED3DRS_COLORWRITEENABLE1 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite },
{ /*191, WINED3DRS_COLORWRITEENABLE2 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite }, { /*191, WINED3DRS_COLORWRITEENABLE2 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite },
{ /*192, WINED3DRS_COLORWRITEENABLE3 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite }, { /*192, WINED3DRS_COLORWRITEENABLE3 */ STATE_RENDER(WINED3DRS_COLORWRITEENABLE), state_colorwrite },
{ /*193, WINED3DRS_BLENDFACTOR */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend }, { /*193, WINED3DRS_BLENDFACTOR */ STATE_RENDER(WINED3DRS_BLENDFACTOR), state_blendfactor },
{ /*194, WINED3DRS_SRGBWRITEENABLE */ STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), state_srgbwrite }, { /*194, WINED3DRS_SRGBWRITEENABLE */ STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), state_srgbwrite },
{ /*195, WINED3DRS_DEPTHBIAS */ STATE_RENDER(WINED3DRS_DEPTHBIAS), state_depthbias }, { /*195, WINED3DRS_DEPTHBIAS */ STATE_RENDER(WINED3DRS_DEPTHBIAS), state_depthbias },
{ /*196, undefined */ 0, state_undefined }, { /*196, undefined */ 0, state_undefined },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment