Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMJP

Posted 17 February 2013 - 07:38 PM

The most likely explanation is that your vertex shader's input signature requires an input element that isn't specified in the array of InputElement's that you're passing to the InputLayout constructor. If you could post your vertex shader code I could tell you for sure, or you could also check the debugger output stream for the detailed error message.

Also isn't the Input element for the vertex supposed to have an offset to where each elements are. It seems like in his code above all the input offset are pointing to 0.


Well for the native D3D11_INPUT_ELEMENT_DESC structure you do need to either specify either the byte offset or D3D11_APPEND_ALIGNED_ELEMENT to indicate that the element is located immediately after the previous element in the stream. However the constructor he's using for the SlimDX InputElement struct doesn't take a byte offset parameter, so I would assume that internally it's setting it to D3D11_APPEND_ALIGNED_ELEMENT. However I'm not a SlimDX expert, so I'm not sure if that's the actual behavior.


#1MJP

Posted 17 February 2013 - 07:37 PM

The most likely explanation is that your vertex shader's input signature requires an input element that isn't specified in the array of InputElement's that you're passing to the InputLayout constructor. If you could post your vertex shader code I could tell you for sure, or you could also check the debugger output stream for the detailed error message.

Also isn't the Input element for the vertex supposed to have an offset to where each elements are. It seems like in his code above all the input offset are pointing to 0.


Well for the native D3D11_INPUT_ELEMENT_DESC structure you do need to either specify either the byte offset or D3D11_APPEND_ALIGNED_ELEMENT to indicate that the element is located immediately after the previous element in the stream. However the constructor he's using for the SlimDX InputElement struct doesn't take a byte offset parameter, so I would assume that internally it's setting it to D3D11_APPEND_ALIGNED_ELEMENT.


PARTNERS