Exemplo n.º 1
0
            public void InitRtv(string debugName, Texture2DDescription resourceDesc,
                                ShaderResourceViewDescription srvDesc, Format rtvFormat)
            {
                base.InitInternal(debugName, resourceDesc, srvDesc);

                m_arraySubresourcesRtv = new MyArraySubresourceRtv[NumSlices, MipmapLevels];
                for (int nSlice = 0; nSlice < NumSlices; nSlice++)
                {
                    for (int nMipmap = 0; nMipmap < MipmapLevels; nMipmap++)
                    {
                        m_arraySubresourcesRtv[nSlice, nMipmap] = new MyArraySubresourceRtv();
                        m_arraySubresourcesRtv[nSlice, nMipmap].Init(this, nSlice, nMipmap, rtvFormat);
                    }
                }
            }
Exemplo n.º 2
0
            public void InitUav(string debugName, Texture2DDescription resourceDesc,
                ShaderResourceViewDescription srvDesc, Format rtvFormat, Format uavFormat)
            {
                base.InitInternal(debugName, resourceDesc, srvDesc);

                m_arraySubresourcesRtv = new MyArraySubresourceRtv[NumSlices, MipmapLevels];
                m_arraySubresourcesUav = new MyArraySubresourceUav[NumSlices, MipmapLevels];
                for (int nSlice = 0; nSlice < NumSlices; nSlice++)
                    for (int nMipmap = 0; nMipmap < MipmapLevels; nMipmap++)
                    {
                        m_arraySubresourcesRtv[nSlice, nMipmap] = new MyArraySubresourceRtv();
                        m_arraySubresourcesRtv[nSlice, nMipmap].Init(this, nSlice, nMipmap, rtvFormat);
                        m_arraySubresourcesUav[nSlice, nMipmap] = new MyArraySubresourceUav();
                        m_arraySubresourcesUav[nSlice, nMipmap].Init(this, nSlice, nMipmap, uavFormat);
                    }
            }