Пример #1
0
        void InternalSetRtvs(IDepthStencil ds, MyDepthStencilAccess access, params IRtvBindable[] rtvs)
        {
            // Init DepthStencilView
            DepthStencilView dsv = null;

            if (ds == null)
            {
                dsv = null;
            }
            else
            {
                IDepthStencilInternal dsInternal = (IDepthStencilInternal)ds;
                switch (access)
                {
                case MyDepthStencilAccess.ReadWrite:
                    dsv = dsInternal.Dsv;
                    break;

                case MyDepthStencilAccess.DepthReadOnly:
                    dsv = dsInternal.Dsv_roDepth;
                    break;

                case MyDepthStencilAccess.StencilReadOnly:
                    dsv = dsInternal.Dsv_roStencil;
                    break;

                case MyDepthStencilAccess.ReadOnly:
                    dsv = dsInternal.Dsv_ro;
                    break;
                }
            }

            InternalSetRtvs(dsv, rtvs);
        }
Пример #2
0
 internal void SetRtvs(MyGBuffer gbuffer, MyDepthStencilAccess access)
 {
     InternalSetRtvs(gbuffer.DepthStencil, access, gbuffer.GBuffer0, gbuffer.GBuffer1, gbuffer.GBuffer2);
     CheckErrors();
 }
Пример #3
0
 internal void SetRtv(IDepthStencil ds, MyDepthStencilAccess access, IRtvBindable rtv)
 {
     InternalSetRtvs(ds, access, rtv);
     CheckErrors();
 }
Пример #4
0
 internal void SetRtvs(IDepthStencil ds, MyDepthStencilAccess access, params IRtvBindable[] rtvs)
 {
     InternalSetRtvs(ds, access, rtvs);
     CheckErrors();
 }
Пример #5
0
 internal void SetRtv(IDepthStencil ds, MyDepthStencilAccess access)
 {
     InternalSetRtvs(ds, access);
     CheckErrors();
 }