# C1.Util.DX.Direct3D9.Device.CreateTexture

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D9_Device_CreateTexture_" data-uid="C1.Util.DX.Direct3D9.Device.CreateTexture*">CreateTexture Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D9_Device_CreateTexture_" data-uid="C1.Util.DX.Direct3D9.Device.CreateTexture*"></a>
<h4 id="C1_Util_DX_Direct3D9_Device_CreateTexture_System_Int32_System_Int32_System_Int32_System_Int32_C1_Util_DX_Direct3D9_Format_C1_Util_DX_Direct3D9_Pool_System_IntPtr_" data-uid="C1.Util.DX.Direct3D9.Device.CreateTexture(System.Int32,System.Int32,System.Int32,System.Int32,C1.Util.DX.Direct3D9.Format,C1.Util.DX.Direct3D9.Pool,System.IntPtr)">CreateTexture(int, int, int, int, Format, Pool, IntPtr)</h4>
<div class="markdown level1 summary"><p>HRESULT IDirect3DDevice9::CreateTexture([In] unsigned int Width,[In] unsigned int Height,[In] unsigned int Levels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[Out, Fast] IDirect3DTexture9** ppTexture,[In] void** pSharedHandle)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Texture CreateTexture(int width, int height, int levels, int usage, Format format, Pool pool, IntPtr sharedHandleRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateTexture(width As Integer, height As Integer, levels As Integer, usage As Integer, format As Format, pool As Pool, sharedHandleRef As IntPtr) As Texture</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">width</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">levels</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">usage</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D9.Format.html">Format</a></td>
      <td><span class="parametername">format</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D9.Pool.html">Pool</a></td>
      <td><span class="parametername">pool</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">sharedHandleRef</span></td>
      <td></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.Direct3D9.Texture.html">Texture</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
