Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualcaballero

Posted 29 January 2012 - 05:07 PM

Thanks for the quick response!
I think you meant VSSetConstantBuffer and PSSetConstantBuffer in the last sentence.

I've replaced setting both cbuffer at the same time

ImmediateContext.VertexShader.SetConstantBuffers(new[] { _matrix_constant_buffer, _light_constant_buffer }, 0,2);

with

ImmediateContext.VertexShader.SetConstantBuffer(_matrix_constant_buffer, 0);
ImmediateContext.VertexShader.SetConstantBuffer(_light_constant_buffer, 1);

and also set the cbuffer to the pixel shader
ImmediateContext.PixelShader.SetConstantBuffer(_light_constant_buffer, 1);

I also tried to attach - : register(cbx) to the cbuffer declaration in the shader code.
but the result is the same error message Posted Image

Alright, I tried the same code with the sharpdx framework with the same ouput..

#1caballero

Posted 29 January 2012 - 03:53 PM

Thanks for the quick response!
I think you meant VSSetConstantBuffer and PSSetConstantBuffer in the last sentence.

I've replaced setting both cbuffer at the same time

ImmediateContext.VertexShader.SetConstantBuffers(new[] { _matrix_constant_buffer, _light_constant_buffer }, 0,2);

with

ImmediateContext.VertexShader.SetConstantBuffer(_matrix_constant_buffer, 0);
ImmediateContext.VertexShader.SetConstantBuffer(_light_constant_buffer, 1);

and also set the cbuffer to the pixel shader
ImmediateContext.PixelShader.SetConstantBuffer(_light_constant_buffer, 1);

I also tried to attach - : register(cbx) to the cbuffer declaration in the shader code.
but the result is the same error message Posted Image

PARTNERS