# C1.Util.DX.Direct3D11.DeviceContext.GetData

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*">GetData Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData_C1_Util_DX_Direct3D11_Asynchronous_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData(C1.Util.DX.Direct3D11.Asynchronous)">GetData(Asynchronous)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DataStream GetData(Asynchronous data)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(data As Asynchronous) As DataStream</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData__1_C1_Util_DX_Direct3D11_Asynchronous_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData``1(C1.Util.DX.Direct3D11.Asynchronous)">GetData&lt;T&gt;(Asynchronous)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public T GetData&lt;T&gt;(Asynchronous data) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(Of T As Structure)(data As Asynchronous) As T</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">T</span></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData__1_C1_Util_DX_Direct3D11_Asynchronous___0__" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData``1(C1.Util.DX.Direct3D11.Asynchronous,``0@)">GetData&lt;T&gt;(Asynchronous, out T)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool GetData&lt;T&gt;(Asynchronous data, out T result) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(Of T As Structure)(data As Asynchronous, ByRef result As T) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">result</span></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if result contains valid data, false otherwise.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData_C1_Util_DX_Direct3D11_Asynchronous_C1_Util_DX_Direct3D11_AsynchronousFlags_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData(C1.Util.DX.Direct3D11.Asynchronous,C1.Util.DX.Direct3D11.AsynchronousFlags)">GetData(Asynchronous, AsynchronousFlags)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DataStream GetData(Asynchronous data, AsynchronousFlags flags)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(data As Asynchronous, flags As AsynchronousFlags) As DataStream</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.AsynchronousFlags.html">AsynchronousFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Flags specifying how the command should operate.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData__1_C1_Util_DX_Direct3D11_Asynchronous_C1_Util_DX_Direct3D11_AsynchronousFlags_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData``1(C1.Util.DX.Direct3D11.Asynchronous,C1.Util.DX.Direct3D11.AsynchronousFlags)">GetData&lt;T&gt;(Asynchronous, AsynchronousFlags)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public T GetData&lt;T&gt;(Asynchronous data, AsynchronousFlags flags) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(Of T As Structure)(data As Asynchronous, flags As AsynchronousFlags) As T</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.AsynchronousFlags.html">AsynchronousFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Flags specifying how the command should operate.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">T</span></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_DeviceContext_GetData_" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData*"></a>
<h4 id="C1_Util_DX_Direct3D11_DeviceContext_GetData__1_C1_Util_DX_Direct3D11_Asynchronous_C1_Util_DX_Direct3D11_AsynchronousFlags___0__" data-uid="C1.Util.DX.Direct3D11.DeviceContext.GetData``1(C1.Util.DX.Direct3D11.Asynchronous,C1.Util.DX.Direct3D11.AsynchronousFlags,``0@)">GetData&lt;T&gt;(Asynchronous, AsynchronousFlags, out T)</h4>
<div class="markdown level1 summary"><p>Gets data from the GPU asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool GetData&lt;T&gt;(Asynchronous data, AsynchronousFlags flags, out T result) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetData(Of T As Structure)(data As Asynchronous, flags As AsynchronousFlags, ByRef result As T) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Asynchronous.html">Asynchronous</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The asynchronous data provider.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.AsynchronousFlags.html">AsynchronousFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Flags specifying how the command should operate.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">result</span></td>
      <td><p>The data retrieved from the GPU.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if result contains valid data, false otherwise.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
