title: Create a D3DX texture from a bitmap or graphic
body: <p>I am attempting to create a texture using DirectX 9 in Delphi 2007.</p>
  
  <p>I am aware of these functions:</p>
  
  <pre><code>D3DXCreateTextureFromFile 
  D3DXCreateTextureFromFileEx
  D3DXCreateTextureFromResource
  D3DXCreateTextureFromFileInMemory
  </code></pre>
  
  <p>but I have the need for the textures to be dynamic (and fast). Is there a function to create a texture from a TBitmap?</p>
  
  <p><strong>More Info:</strong><br>
  My end goal is to use DirectX to display a video the user selects. The need for DirectX is to overlay text on top of the Video as well as transition between videos as the user selects the next one. I am using a component that plays the videos and pumps out a bitmap for each frame, and this is what I would like to use for the texture.</p>