コード例 #1
0
        internal DataBox MapSubresource(IResource resourceRef, int subresource, MapMode mapType,
                                        MapFlags mapFlags)
        {
            return(m_deviceContext.MapSubresource(resourceRef.Resource, subresource, mapType, mapFlags));

            CheckErrors();
        }
コード例 #2
0
        public void SetConstants <T>(T constants) where T : struct
        {
            const D3D11.MapMode  MODE  = D3D11.MapMode.WriteDiscard;
            const D3D11.MapFlags FLAGS = D3D11.MapFlags.None;

            var context = Graphics.Device.ImmediateContext;

            DataStream dataStream;

            context.MapSubresource(ConstantBuffer, MODE, FLAGS, out dataStream);
            dataStream.Write(constants);
            dataStream.Dispose();
            context.UnmapSubresource(ConstantBuffer, 0);
        }
コード例 #3
0
        internal DataBox MapSubresource(Texture3D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags,
                                        out DataStream stream)
        {
            return(m_deviceContext.MapSubresource(resource, mipSlice, arraySlice, mode, flags, out stream));

            CheckErrors();
        }
コード例 #4
0
        internal DataBox MapSubresource(IResource resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out int mipSize)
        {
            return(m_deviceContext.MapSubresource(resource.Resource, mipSlice, arraySlice, mode, flags, out mipSize));

            CheckErrors();
        }