26 Apr
2016
26 Apr
'16
10:21 a.m.
On 25 April 2016 at 12:25, Józef Kucia <jkucia(a)codeweavers.com> wrote:
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, NULL, &context->ps_cb); + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create constant buffer, hr %#x.\n", hr); + } + + ID3D11DeviceContext_PSSetShader(context->immediate_context, context->ps, NULL, 0); + ID3D11DeviceContext_PSSetConstantBuffers(context->immediate_context, 0, 1, &context->ps_cb); + + ID3D11DeviceContext_UpdateSubresource(context->immediate_context, (ID3D11Resource *)context->ps_cb, 0, + NULL, color, 0, 0); There isn't anything wrong with doing it like this, but note that you could also specify the initial contents when creating the buffer.