Ejemplo n.º 1
0
        protected unsafe override bool InitFinish(ref ShaderEffectDesc desc)
        {
            if (!base.InitFinish(ref desc))
            {
                return(false);
            }
            IntPtr vsHandle = vs != null ? vs.handle : IntPtr.Zero;
            IntPtr psHandle = ps != null ? ps.handle : IntPtr.Zero;
            IntPtr hsHandle = hs != null ? hs.handle : IntPtr.Zero;
            IntPtr dsHandle = ds != null ? ds.handle : IntPtr.Zero;
            IntPtr gsHandle = gs != null ? gs.handle : IntPtr.Zero;

            using (var nativeDesc = new ShaderEffectDesc_NativeInterop(ref desc))
            {
                return(Orbital_Video_D3D12_ShaderEffect_Init(handle, vsHandle, psHandle, hsHandle, dsHandle, gsHandle, &nativeDesc) != 0);
            }
        }
Ejemplo n.º 2
0
        protected unsafe override bool InitFinish(ref ShaderEffectDesc desc)
        {
            if (desc.constantBuffers != null)
            {
                constantBufferCount = desc.constantBuffers.Length;
            }
            if (desc.textures != null)
            {
                textureCount = desc.textures.Length;
            }

            IntPtr vsHandle = vs != null ? vs.handle : IntPtr.Zero;
            IntPtr psHandle = ps != null ? ps.handle : IntPtr.Zero;
            IntPtr hsHandle = hs != null ? hs.handle : IntPtr.Zero;
            IntPtr dsHandle = ds != null ? ds.handle : IntPtr.Zero;
            IntPtr gsHandle = gs != null ? gs.handle : IntPtr.Zero;

            using (var nativeDesc = new ShaderEffectDesc_NativeInterop(ref desc))
            {
                return(Orbital_Video_D3D12_ShaderEffect_Init(handle, vsHandle, psHandle, hsHandle, dsHandle, gsHandle, &nativeDesc) != 0);
            }
        }