public unsafe ID3D11ComputeShader CreateComputeShader(byte[] shaderBytecode, ID3D11ClassLinkage classLinkage = null)
 {
     fixed(void *pBuffer = shaderBytecode)
     {
         return(CreateComputeShader((IntPtr)pBuffer, shaderBytecode.Length, classLinkage));
     }
 }
        public unsafe ID3D11DomainShader CreateDomainShader(byte[] shaderBytecode, ID3D11ClassLinkage classLinkage = null)
        {
            Guard.NotNull(shaderBytecode, nameof(shaderBytecode));

            fixed(void *pBuffer = shaderBytecode)
            {
                return(CreateDomainShader((IntPtr)pBuffer, shaderBytecode.Length, classLinkage));
            }
        }
 internal D3D11ClassLinkage(ID3D11ClassLinkage classLinkage)
 {
     this.classLinkage = classLinkage;
 }
Exemple #4
0
        public static IComObject <ID3D11PixelShader> CreatePixelShader(this ID3D11Device device, ID3D10Blob blob, ID3D11ClassLinkage classLinkage = null)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            if (blob == null)
            {
                throw new ArgumentNullException(nameof(blob));
            }

            device.CreatePixelShader(blob.GetBufferPointer(), blob.GetBufferSize(), classLinkage, out var shader).ThrowOnError();
            return(new ComObject <ID3D11PixelShader>(shader));
        }
Exemple #5
0
        public static IComObject <ID3D11VertexShader> CreateVertexShader(this ID3D11Device device, IntPtr shaderBytecode, int bytecodeLength, ID3D11ClassLinkage classLinkage = null)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            device.CreateVertexShader(shaderBytecode, (IntPtr)bytecodeLength, classLinkage, out var shader).ThrowOnError();
            return(new ComObject <ID3D11VertexShader>(shader));
        }
Exemple #6
0
 public static IComObject <ID3D11VertexShader> CreateVertexShader(this IComObject <ID3D11Device> device, IntPtr shaderBytecode, int bytecodeLength, ID3D11ClassLinkage classLinkage = null) => CreateVertexShader(device?.Object, shaderBytecode, bytecodeLength, classLinkage);
Exemple #7
0
 internal D3D11ClassLinkage(ID3D11ClassLinkage classLinkage)
 {
     this.classLinkage = classLinkage;
 }