McKineap.Models.Model3D.ModelMesh.SetInputLayout C# (CSharp) Method

SetInputLayout() public method

Sets the input layout and make sure it matches the vertex format from the shader
public SetInputLayout ( SharpDX.Direct3D11.Device device, SharpDX.D3DCompiler.ShaderSignature inputSignature ) : void
device SharpDX.Direct3D11.Device
inputSignature SharpDX.D3DCompiler.ShaderSignature
return void
        public void SetInputLayout(Device device, ShaderSignature inputSignature)
        {
            m_inputLayout = new InputLayout(device, inputSignature, m_inputElements);
            if (m_inputLayout == null)
            {
                throw new Exception("mesh and vertex shader input layouts do not match!");
            }
        }