internal DataBox MapSubresource(IResource resourceRef, int subresource, MapMode mapType, MapFlags mapFlags) { return(m_deviceContext.MapSubresource(resourceRef.Resource, subresource, mapType, mapFlags)); CheckErrors(); }
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); }
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(); }
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(); }