title: Drawing text to a 2D texture in DirectX 11?
body: <p>I'd like to be able to apply a transparent texture to each face of a simple 3D cube. Each texture is simply the name of the face, e.g. "Front", "Back", "Left", etc. Normally I'd just create an image in a paint app, then save it, and load the image as a texture at runtime. However, the twist is that I'd like this text to be in multiple (and growing) different languages and although creating six new images for each language is one method, it would be preferable to dynamically generate textures from translated strings instead.</p>
  
  <p>So the ideal solution is to <strong>be able to render a text string to a 2D texture at runtime</strong> (using any font and colour I choose), then render the resultant texture over each surface as a transparent overlay. <strong>Can this be done relatively easily?</strong></p>
  
  <p>e.g. this sort of process:</p>
  
  <p><a href="https://i.stack.imgur.com/f0xS0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f0xS0.png" alt="text-to-texture-to-cube"></a></p>
  
  <p>Getting the texture onto the cube is easy enough. It's the getting the text (string) rendered to a texture (ID3D11Texture2D) which is the tricky part. It seems as though it should be very do-able. Very new at this, so as far as possible keep any explanations in beginner-friendly language where possible.</p>