private void OnAmbientColorChanged() { var bufferStruct = new AmbientLightBuffer(ambientColor); deviceContext.UpdateSubresource <AmbientLightBuffer>(ref bufferStruct, ambientLightBuffer); deviceContext.PixelShader.SetConstantBuffer(1, ambientLightBuffer); }
private void OnAmbientColorChanged() { var bufferStruct = new AmbientLightBuffer(ambientColor); deviceContext.UpdateSubresource<AmbientLightBuffer>(ref bufferStruct, ambientLightBuffer); deviceContext.PixelShader.SetConstantBuffer(1, ambientLightBuffer); }