This code is throwing an exception (D3D invalid parameter) on the last line of the function and I'm not sure why. It seems to be consistent with what is shown in the SlimDX SimpleTriangle tutorial:
public void InitShaders(ShaderBytecode vShader, ShaderBytecode pShader)
{
this.vShader = new VertexShader(this.Device, vShader);
this.pShader = new PixelShader(this.Device, pShader);
InputElement[] inputElements =
{
new InputElement("POSITION", 0, Format.R32G32B32_Float, 0),
new InputElement("TEXCOORD", 0, Format.R32G32_Float,0),
new InputElement("NORMAL", 0, Format.R32G32B32_Float, 0)
};
this.Context.InputAssembler.InputLayout = new InputLayout(this.Device, ShaderSignature.GetInputSignature(vShader), inputElements);
}
Any ideas?







