# C1.Util.DX.Direct3D11.Buffer.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create_C1_Util_DX_Direct3D11_Device_C1_Util_DX_Direct3D11_BufferDescription_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create(C1.Util.DX.Direct3D11.Device,C1.Util.DX.Direct3D11.BufferDescription)">Create(Device, BufferDescription)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create(Device device, BufferDescription description)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(device As Device, description As BufferDescription) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BufferDescription.html">BufferDescription</a></td>
      <td><span class="parametername">description</span></td>
      <td><p>The description of the buffer.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create_C1_Util_DX_Direct3D11_Device_C1_Util_DX_DataStream_C1_Util_DX_Direct3D11_BufferDescription_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create(C1.Util.DX.Direct3D11.Device,C1.Util.DX.DataStream,C1.Util.DX.Direct3D11.BufferDescription)">Create(Device, DataStream, BufferDescription)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create(Device device, DataStream data, BufferDescription description)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(device As Device, data As DataStream, description As BufferDescription) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BufferDescription.html">BufferDescription</a></td>
      <td><span class="parametername">description</span></td>
      <td><p>The description of the buffer.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create_C1_Util_DX_Direct3D11_Device_System_IntPtr_C1_Util_DX_Direct3D11_BufferDescription_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create(C1.Util.DX.Direct3D11.Device,System.IntPtr,C1.Util.DX.Direct3D11.BufferDescription)">Create(Device, IntPtr, BufferDescription)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create(Device device, IntPtr dataPointer, BufferDescription description)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(device As Device, dataPointer As IntPtr, description As BufferDescription) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">dataPointer</span></td>
      <td><p>The data pointer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BufferDescription.html">BufferDescription</a></td>
      <td><span class="parametername">description</span></td>
      <td><p>The description of the buffer.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create_C1_Util_DX_Direct3D11_Device_System_Int32_C1_Util_DX_Direct3D11_ResourceUsage_C1_Util_DX_Direct3D11_BindFlags_C1_Util_DX_Direct3D11_CpuAccessFlags_C1_Util_DX_Direct3D11_ResourceMiscFlags_System_Int32_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create(C1.Util.DX.Direct3D11.Device,System.Int32,C1.Util.DX.Direct3D11.ResourceUsage,C1.Util.DX.Direct3D11.BindFlags,C1.Util.DX.Direct3D11.CpuAccessFlags,C1.Util.DX.Direct3D11.ResourceMiscFlags,System.Int32)">Create(Device, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create(Device device, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(device As Device, sizeInBytes As Integer, usage As ResourceUsage, bindFlags As BindFlags, accessFlags As CpuAccessFlags, miscFlags As ResourceMiscFlags, structureByteStride As Integer) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">sizeInBytes</span></td>
      <td><p>The size, in bytes, of the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceUsage.html">ResourceUsage</a></td>
      <td><span class="parametername">usage</span></td>
      <td><p>The usage pattern for the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BindFlags.html">BindFlags</a></td>
      <td><span class="parametername">bindFlags</span></td>
      <td><p>Flags specifying how the buffer will be bound to the pipeline.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.CpuAccessFlags.html">CpuAccessFlags</a></td>
      <td><span class="parametername">accessFlags</span></td>
      <td><p>Flags specifying how the buffer will be accessible from the CPU.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html">ResourceMiscFlags</a></td>
      <td><span class="parametername">miscFlags</span></td>
      <td><p>Miscellaneous resource options.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">structureByteStride</span></td>
      <td><p>The size (in bytes) of the structure element for structured buffers.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create_C1_Util_DX_Direct3D11_Device_C1_Util_DX_DataStream_System_Int32_C1_Util_DX_Direct3D11_ResourceUsage_C1_Util_DX_Direct3D11_BindFlags_C1_Util_DX_Direct3D11_CpuAccessFlags_C1_Util_DX_Direct3D11_ResourceMiscFlags_System_Int32_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create(C1.Util.DX.Direct3D11.Device,C1.Util.DX.DataStream,System.Int32,C1.Util.DX.Direct3D11.ResourceUsage,C1.Util.DX.Direct3D11.BindFlags,C1.Util.DX.Direct3D11.CpuAccessFlags,C1.Util.DX.Direct3D11.ResourceMiscFlags,System.Int32)">Create(Device, DataStream, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create(Device device, DataStream data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(device As Device, data As DataStream, sizeInBytes As Integer, usage As ResourceUsage, bindFlags As BindFlags, accessFlags As CpuAccessFlags, miscFlags As ResourceMiscFlags, structureByteStride As Integer) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">sizeInBytes</span></td>
      <td><p>The size, in bytes, of the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceUsage.html">ResourceUsage</a></td>
      <td><span class="parametername">usage</span></td>
      <td><p>The usage pattern for the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BindFlags.html">BindFlags</a></td>
      <td><span class="parametername">bindFlags</span></td>
      <td><p>Flags specifying how the buffer will be bound to the pipeline.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.CpuAccessFlags.html">CpuAccessFlags</a></td>
      <td><span class="parametername">accessFlags</span></td>
      <td><p>Flags specifying how the buffer will be accessible from the CPU.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html">ResourceMiscFlags</a></td>
      <td><span class="parametername">miscFlags</span></td>
      <td><p>Miscellaneous resource options.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">structureByteStride</span></td>
      <td><p>The size (in bytes) of the structure element for structured buffers.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create__1_C1_Util_DX_Direct3D11_Device_C1_Util_DX_Direct3D11_BindFlags___0__System_Int32_C1_Util_DX_Direct3D11_ResourceUsage_C1_Util_DX_Direct3D11_CpuAccessFlags_C1_Util_DX_Direct3D11_ResourceMiscFlags_System_Int32_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create``1(C1.Util.DX.Direct3D11.Device,C1.Util.DX.Direct3D11.BindFlags,``0@,System.Int32,C1.Util.DX.Direct3D11.ResourceUsage,C1.Util.DX.Direct3D11.CpuAccessFlags,C1.Util.DX.Direct3D11.ResourceMiscFlags,System.Int32)">Create&lt;T&gt;(Device, BindFlags, ref T, int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create&lt;T&gt;(Device device, BindFlags bindFlags, ref T data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(Of T As Structure)(device As Device, bindFlags As BindFlags, ByRef data As T, Optional sizeInBytes As Integer = 0, Optional usage As ResourceUsage = ResourceUsage.Default, Optional accessFlags As CpuAccessFlags = CpuAccessFlags.None, Optional miscFlags As ResourceMiscFlags = ResourceMiscFlags.None, Optional structureByteStride As Integer = 0) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BindFlags.html">BindFlags</a></td>
      <td><span class="parametername">bindFlags</span></td>
      <td><p>Flags specifying how the buffer will be bound to the pipeline.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">sizeInBytes</span></td>
      <td><p>The size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceUsage.html">ResourceUsage</a></td>
      <td><span class="parametername">usage</span></td>
      <td><p>The usage pattern for the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.CpuAccessFlags.html">CpuAccessFlags</a></td>
      <td><span class="parametername">accessFlags</span></td>
      <td><p>Flags specifying how the buffer will be accessible from the CPU.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html">ResourceMiscFlags</a></td>
      <td><span class="parametername">miscFlags</span></td>
      <td><p>Miscellaneous resource options.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">structureByteStride</span></td>
      <td><p>The size (in bytes) of the structure element for structured buffers.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td><p>An initialized buffer</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><p>Type of the data to upload</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create__1_C1_Util_DX_Direct3D11_Device_C1_Util_DX_Direct3D11_BindFlags___0___System_Int32_C1_Util_DX_Direct3D11_ResourceUsage_C1_Util_DX_Direct3D11_CpuAccessFlags_C1_Util_DX_Direct3D11_ResourceMiscFlags_System_Int32_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create``1(C1.Util.DX.Direct3D11.Device,C1.Util.DX.Direct3D11.BindFlags,``0[],System.Int32,C1.Util.DX.Direct3D11.ResourceUsage,C1.Util.DX.Direct3D11.CpuAccessFlags,C1.Util.DX.Direct3D11.ResourceMiscFlags,System.Int32)">Create&lt;T&gt;(Device, BindFlags, T[], int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create&lt;T&gt;(Device device, BindFlags bindFlags, T[] data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(Of T As Structure)(device As Device, bindFlags As BindFlags, data As T(), Optional sizeInBytes As Integer = 0, Optional usage As ResourceUsage = ResourceUsage.Default, Optional accessFlags As CpuAccessFlags = CpuAccessFlags.None, Optional miscFlags As ResourceMiscFlags = ResourceMiscFlags.None, Optional structureByteStride As Integer = 0) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BindFlags.html">BindFlags</a></td>
      <td><span class="parametername">bindFlags</span></td>
      <td><p>Flags specifying how the buffer will be bound to the pipeline.</p>
</td>
    </tr>
    <tr>
      <td>T[]</td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">sizeInBytes</span></td>
      <td><p>The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceUsage.html">ResourceUsage</a></td>
      <td><span class="parametername">usage</span></td>
      <td><p>The usage pattern for the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.CpuAccessFlags.html">CpuAccessFlags</a></td>
      <td><span class="parametername">accessFlags</span></td>
      <td><p>Flags specifying how the buffer will be accessible from the CPU.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html">ResourceMiscFlags</a></td>
      <td><span class="parametername">miscFlags</span></td>
      <td><p>Miscellaneous resource options.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">structureByteStride</span></td>
      <td><p>The size (in bytes) of the structure element for structured buffers.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td><p>An initialized buffer</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><p>Type of the data to upload</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create__1_C1_Util_DX_Direct3D11_Device___0__C1_Util_DX_Direct3D11_BufferDescription_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create``1(C1.Util.DX.Direct3D11.Device,``0@,C1.Util.DX.Direct3D11.BufferDescription)">Create&lt;T&gt;(Device, ref T, BufferDescription)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create&lt;T&gt;(Device device, ref T data, BufferDescription description) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(Of T As Structure)(device As Device, ByRef data As T, description As BufferDescription) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BufferDescription.html">BufferDescription</a></td>
      <td><span class="parametername">description</span></td>
      <td><p>The description.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td><p>An initialized buffer</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><p>Type of the data to upload</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Buffer_Create_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create*"></a>
<h4 id="C1_Util_DX_Direct3D11_Buffer_Create__1_C1_Util_DX_Direct3D11_Device___0___C1_Util_DX_Direct3D11_BufferDescription_" data-uid="C1.Util.DX.Direct3D11.Buffer.Create``1(C1.Util.DX.Direct3D11.Device,``0[],C1.Util.DX.Direct3D11.BufferDescription)">Create&lt;T&gt;(Device, T[], BufferDescription)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of the <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Buffer Create&lt;T&gt;(Device device, T[] data, BufferDescription description) where T : struct</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(Of T As Structure)(device As Device, data As T(), description As BufferDescription) As Buffer</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.Device.html">Device</a></td>
      <td><span class="parametername">device</span></td>
      <td><p>The device with which to associate the buffer.</p>
</td>
    </tr>
    <tr>
      <td>T[]</td>
      <td><span class="parametername">data</span></td>
      <td><p>Initial data used to initialize the buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.BufferDescription.html">BufferDescription</a></td>
      <td><span class="parametername">description</span></td>
      <td><p>The description.</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.Direct3D11.Buffer.html">Buffer</a></td>
      <td><p>An initialized buffer</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><p>Type of the data to upload</p>
</td>
    </tr>
  </tbody>
</table>
</div>
