how to render text to a surface that can be mapped onto a quad in world space?

can someone give me some source code or an sample with C++ language?thank you!
[78 byte] By [braveocean] at [2007-12-22]
# 1

It's call Render to Surface

You create a texture with the flag RENDER_TARGET

You Get the Surface of that Texture

You specify the RenderTarget of the Device to use this surface

You draw like you would for the normal render

so you need to use Begin and End

You use the Draw text function you like, any of the sample will do

Once this is done you simply use the texture as any other texture

Make sure you prepared those texture in advance and

not in the loop of Begin and End of the main render...

Etienne2005 at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2

Thank you very much!

Another question: How to render text in world space just like the text above people's head in the game of world of warcraft? same? or there is another efficiency way? thank's a lot!

braveocean at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3

In the SDK one sample is call Text3D

One of the sample shows how to render 3D text

You simply need to place this over your main people head and maybe add a rotation to it

In reality those 3D text are Meshes

You have a DX function to create 3D Text Meshes and then you need to use the resulting meshes

like you would for any other mesh, by calling subset, defining material etc.

Etienne2005 at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...