d3d10core: Implement d3d10_device_OMSetBlendState().

This commit is contained in:
Henri Verbeet 2012-10-04 13:53:25 +02:00 committed by Alexandre Julliard
parent 291edc484f
commit e69c28a0f7
3 changed files with 20 additions and 1 deletions

View File

@ -217,6 +217,7 @@ struct d3d10_blend_state
};
HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state) DECLSPEC_HIDDEN;
struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) DECLSPEC_HIDDEN;
/* ID3D10DepthStencilState */
struct d3d10_depthstencil_state
@ -269,6 +270,9 @@ struct d3d10_device
struct wined3d_device_parent device_parent;
struct wined3d_device *wined3d_device;
struct d3d10_blend_state *blend_state;
float blend_factor[4];
UINT sample_mask;
struct d3d10_depthstencil_state *depth_stencil_state;
UINT stencil_ref;
struct d3d10_rasterizer_state *rasterizer_state;

View File

@ -318,8 +318,14 @@ static void STDMETHODCALLTYPE d3d10_device_OMSetRenderTargets(ID3D10Device *ifac
static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device *iface,
ID3D10BlendState *blend_state, const FLOAT blend_factor[4], UINT sample_mask)
{
FIXME("iface %p, blend_state %p, blend_factor [%f %f %f %f], sample_mask 0x%08x stub!\n",
struct d3d10_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, blend_state %p, blend_factor [%f %f %f %f], sample_mask 0x%08x.\n",
iface, blend_state, blend_factor[0], blend_factor[1], blend_factor[2], blend_factor[3], sample_mask);
device->blend_state = unsafe_impl_from_ID3D10BlendState(blend_state);
memcpy(device->blend_factor, blend_factor, 4 * sizeof(*blend_factor));
device->sample_mask = sample_mask;
}
static void STDMETHODCALLTYPE d3d10_device_OMSetDepthStencilState(ID3D10Device *iface,

View File

@ -140,6 +140,15 @@ HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state)
return S_OK;
}
struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d10_blend_state_vtbl);
return impl_from_ID3D10BlendState(iface);
}
static inline struct d3d10_depthstencil_state *impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface)
{
return CONTAINING_RECORD(iface, struct d3d10_depthstencil_state, ID3D10DepthStencilState_iface);