Exemplo n.º 1
0
        public virtual int CreateGeometryShader(
            IntPtr pShaderBytecode,
            ulong BytecodeLength,
            ID3D11ClassLinkage pClassLinkage,
            out ID3D11GeometryShader ppGeometryShader
            )
        {
            var fp = GetFunctionPointer(13);

            if (m_CreateGeometryShaderFunc == null)
            {
                m_CreateGeometryShaderFunc = (CreateGeometryShaderFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGeometryShaderFunc));
            }
            ppGeometryShader = new ID3D11GeometryShader();
            return(m_CreateGeometryShaderFunc(m_ptr, pShaderBytecode, BytecodeLength, pClassLinkage != null ? pClassLinkage.Ptr : IntPtr.Zero, out ppGeometryShader.PtrForNew));
        }
Exemplo n.º 2
0
        public virtual int CreateGeometryShaderWithStreamOutput(
            IntPtr pShaderBytecode,
            ulong BytecodeLength,
            ref D3D11_SO_DECLARATION_ENTRY pSODeclaration,
            uint NumEntries,
            ref uint pBufferStrides,
            uint NumStrides,
            uint RasterizedStream,
            ID3D11ClassLinkage pClassLinkage,
            out ID3D11GeometryShader ppGeometryShader
            )
        {
            var fp = GetFunctionPointer(14);

            if (m_CreateGeometryShaderWithStreamOutputFunc == null)
            {
                m_CreateGeometryShaderWithStreamOutputFunc = (CreateGeometryShaderWithStreamOutputFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGeometryShaderWithStreamOutputFunc));
            }
            ppGeometryShader = new ID3D11GeometryShader();
            return(m_CreateGeometryShaderWithStreamOutputFunc(m_ptr, pShaderBytecode, BytecodeLength, ref pSODeclaration, NumEntries, ref pBufferStrides, NumStrides, RasterizedStream, pClassLinkage != null ? pClassLinkage.Ptr : IntPtr.Zero, out ppGeometryShader.PtrForNew));
        }