Пример #1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "T:SharpDX.Direct3D10.GeometryShader" /> class.
 /// </summary>
 /// <param name = "device">The device used to create the shader.</param>
 /// <param name = "shaderBytecode">The compiled shader bytecode.</param>
 /// <param name = "elements">An array of <see cref = "T:SharpDX.Direct3D10.StreamOutputElement" /> instances describing the layout of the output buffers.</param>
 /// <param name = "outputStreamStride">The size, in bytes, of each element in the array pointed to by pSODeclaration. This parameter is only used when the output slot is 0 for all entries in pSODeclaration.</param>
 public unsafe GeometryShader(Device device, byte[] shaderBytecode, StreamOutputElement[] elements, int outputStreamStride)
     : base(IntPtr.Zero)
 {
     fixed(void *ptr = shaderBytecode)
     device.CreateGeometryShaderWithStreamOutput((IntPtr)ptr, shaderBytecode.Length, elements, elements.Length, outputStreamStride, this);
 }