コード例 #1
0
ファイル: HullShader.cs プロジェクト: zmtzawqlp/SharpDX
        /// <summary>
        ///   Initializes a new instance of the <see cref = "T:SharpDX.Direct3D11.HullShader" /> class.
        /// </summary>
        /// <param name = "device">The device used to create the shader.</param>
        /// <param name = "shaderBytecode">The compiled shader bytecode.</param>
        /// <param name = "linkage">A dynamic class linkage interface.</param>
        public HullShader(Device device, byte[] shaderBytecode, ClassLinkage linkage = null)
            : base(IntPtr.Zero)
        {
            if (shaderBytecode == null)
            {
                throw new ArgumentNullException("shaderBytecode", "ShaderBytecode cannot be null");
            }

            unsafe
            {
                fixed(void *pBuffer = shaderBytecode)
                device.CreateHullShader((IntPtr)pBuffer, shaderBytecode.Length, linkage, this);
            }
        }