# C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers*">SetConstantBuffers Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_System_Int32_C1_Util_DX_Direct3D11_Buffer___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers(System.Int32,C1.Util.DX.Direct3D11.Buffer[])">SetConstantBuffers(int, params Buffer[])</h4>
<div class="markdown level1 summary"><p>Sets an array of constant buffers to be used by the shader stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetConstantBuffers(int slot, params Buffer[] constantBuffers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetConstantBuffers(slot As Integer, ParamArray constantBuffers 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>Index into the device's zero-based array to which to set the array of constant buffers.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>[]</td>
      <td><span class="parametername">constantBuffers</span></td>
      <td><p>An array of constant buffer to set</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_Buffer__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers(System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.Buffer})">SetConstantBuffers(int, ComArray&lt;Buffer&gt;)</h4>
<div class="markdown level1 summary"><p>Sets an array of constant buffers to be used by the shader stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetConstantBuffers(int slot, ComArray&lt;Buffer&gt; constantBuffers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetConstantBuffers(slot As Integer, constantBuffers As ComArray(Of 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>Index into the device's zero-based array to which to set the array of constant buffers.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>&gt;</td>
      <td><span class="parametername">constantBuffers</span></td>
      <td><p>An array of constant buffer to set</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_System_Int32_System_Int32_C1_Util_DX_Direct3D11_Buffer___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers(System.Int32,System.Int32,C1.Util.DX.Direct3D11.Buffer[])">SetConstantBuffers(int, int, params Buffer[])</h4>
<div class="markdown level1 summary"><p>Set the constant buffers used by the shader pipeline stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetConstantBuffers(int startSlot, int numBuffers, params Buffer[] constantBuffers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetConstantBuffers(startSlot As Integer, numBuffers As Integer, ParamArray constantBuffers 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startSlot</span></td>
      <td><p>Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numBuffers</span></td>
      <td><p>Number of buffers to set (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>[]</td>
      <td><span class="parametername">constantBuffers</span></td>
      <td><p>Array of constant buffers (see <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>) being given to the device.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetConstantBuffers_System_Int32_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_Buffer__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetConstantBuffers(System.Int32,System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.Buffer})">SetConstantBuffers(int, int, ComArray&lt;Buffer&gt;)</h4>
<div class="markdown level1 summary"><p>Set the constant buffers used by the shader pipeline stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetConstantBuffers(int startSlot, int numBuffers, ComArray&lt;Buffer&gt; constantBuffers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetConstantBuffers(startSlot As Integer, numBuffers As Integer, constantBuffers As ComArray(Of 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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startSlot</span></td>
      <td><p>Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numBuffers</span></td>
      <td><p>Number of buffers to set (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>&gt;</td>
      <td><span class="parametername">constantBuffers</span></td>
      <td><p>Array of constant buffers (see <a class="xref" href="C1.Util.DX.Direct3D11.Buffer.html">Buffer</a>) being given to the device.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
