Esempio n. 1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "T:SharpDX.Direct3D11.InputLayout" /> object to describe the
 ///   input-buffer data for the input-assembler stage.
 /// </summary>
 /// <unmanaged>ID3D11Device::CreateInputLayout</unmanaged>
 /// <param name = "device">The device used to create the layout.</param>
 /// <param name = "elements">An array of input elements describing the layout of the input data.</param>
 /// <param name = "shaderBytecode">The compiled shader used to validate the input elements.</param>
 public InputLayout(Device device, byte[] shaderBytecode, InputElement[] elements)
     : base(IntPtr.Zero)
 {
     unsafe
     {
         fixed(void *pBuffer = shaderBytecode)
         device.CreateInputLayout(elements, elements.Length, (IntPtr)pBuffer, shaderBytecode.Length, this);
     }
 }