mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 13:27:35 +00:00
wined3d: Implement BlendFactor renderstate.
This commit is contained in:
parent
c33e6245b5
commit
d1d5f4b646
1 changed files with 20 additions and 2 deletions
|
@ -3608,6 +3608,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
|
||||||
This->srcBlend = newVal;
|
This->srcBlend = newVal;
|
||||||
This->dstBlend = newVal;
|
This->dstBlend = newVal;
|
||||||
break;
|
break;
|
||||||
|
case D3DBLEND_BLENDFACTOR : newVal = GL_CONSTANT_COLOR; break;
|
||||||
|
case D3DBLEND_INVBLENDFACTOR : newVal = GL_ONE_MINUS_CONSTANT_COLOR; break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unrecognized src/dest blend value %ld (%d)\n", Value, State);
|
FIXME("Unrecognized src/dest blend value %ld (%d)\n", Value, State);
|
||||||
}
|
}
|
||||||
|
@ -4534,8 +4536,24 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
|
||||||
|
|
||||||
case WINED3DRS_BLENDFACTOR :
|
case WINED3DRS_BLENDFACTOR :
|
||||||
{
|
{
|
||||||
if(0xFFFFFFFF != Value)
|
float col[4];
|
||||||
ERR("(%p)->(%s,%ld) not yet implemented. Missing of cap D3DPBLENDCAPS_BLENDFACTOR wasn't honored?\n", This, debug_d3drenderstate(State), Value);
|
if (GL_SUPPORT(ARB_IMAGING)) {
|
||||||
|
|
||||||
|
TRACE("Setting BlendFactor to %ld", Value);
|
||||||
|
|
||||||
|
D3DCOLORTOGLFLOAT4(Value, col);
|
||||||
|
if (0xFFFFFFFF != Value) {
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
checkGLcall("glEnable(GL_BLEND)");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
glDisable(GL_BLEND);
|
||||||
|
checkGLcall("glDisable(GL_BLEND)");
|
||||||
|
}
|
||||||
|
glBlendColor (col[0],col[1],col[2],col[3]);
|
||||||
|
} else {
|
||||||
|
WARN("Unsupported in local OpenGL implementation: glBlendColor\n");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue