Exemplo n.º 1
0
 internal unsafe void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region)
 {
     if (resource == null)
     {
         throw new ArgumentNullException("resource");
     }
     NativeDeviceContext.UpdateSubresource(*(SharpDX.DataBox *)Interop.Cast(ref databox), resource.NativeResource, subResourceIndex, *(SharpDX.Direct3D11.ResourceRegion *)Interop.Cast(ref region));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Update constant buffer
 /// </summary>
 /// <typeparam name="T">Data Type</typeparam>
 /// <param name="buffer">Buffer to update</param>
 /// <param name="data">Data to write inside buffer</param>
 public void UpdateData <T>(Buffer11 buffer, T data) where T : struct
 {
     NativeDeviceContext.UpdateSubresource(ref data, buffer);
 }