Commit 230785dc authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d2d1: Force alpha to 1.0f for clears.

parent c4503779
...@@ -1133,6 +1133,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_PopAxisAlignedClip(ID2D1Rend ...@@ -1133,6 +1133,7 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_PopAxisAlignedClip(ID2D1Rend
static void STDMETHODCALLTYPE d2d_d3d_render_target_Clear(ID2D1RenderTarget *iface, const D2D1_COLOR_F *color) static void STDMETHODCALLTYPE d2d_d3d_render_target_Clear(ID2D1RenderTarget *iface, const D2D1_COLOR_F *color)
{ {
struct d2d_d3d_render_target *render_target = impl_from_ID2D1RenderTarget(iface); struct d2d_d3d_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
D2D1_COLOR_F c = {0.0f, 0.0f, 0.0f, 0.0f};
D3D10_SUBRESOURCE_DATA buffer_data; D3D10_SUBRESOURCE_DATA buffer_data;
D3D10_BUFFER_DESC buffer_desc; D3D10_BUFFER_DESC buffer_desc;
ID3D10Buffer *vs_cb, *ps_cb; ID3D10Buffer *vs_cb, *ps_cb;
...@@ -1162,8 +1163,11 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_Clear(ID2D1RenderTarget *ifa ...@@ -1162,8 +1163,11 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_Clear(ID2D1RenderTarget *ifa
return; return;
} }
buffer_desc.ByteWidth = sizeof(*color); if (color)
buffer_data.pSysMem = color; c = *color;
c.a = 1.0f;
buffer_desc.ByteWidth = sizeof(c);
buffer_data.pSysMem = &c;
if (FAILED(hr = ID3D10Device_CreateBuffer(render_target->device, &buffer_desc, &buffer_data, &ps_cb))) if (FAILED(hr = ID3D10Device_CreateBuffer(render_target->device, &buffer_desc, &buffer_data, &ps_cb)))
{ {
......
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