Writing text in 3d coordinates

Started by
1 comment, last by san__gohan 18 years, 10 months ago
Hello, I would like to draw some text from which I only have 3D coordinates. What should be done to transform these coordinates in screen coordinates (because the font class only alows screen coordinates). For example, the Line helper class makes it easy to draw a line given its 3D coordinates and the world/view/proj matrix thanks to the drawTransform function, but I couldn't find a similar function for text. Thanks!
Advertisement
Use the function D3DXVec3Project and insert the current matrices and viewport. Note that the GetTransform and GetViewport function do not give results on pure devices.

Simply insert your 3d point, the matrices and the viewport and you get the screen coordinates.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Quote:Original post by Endurion
Use the function D3DXVec3Project and insert the current matrices and viewport. Note that the GetTransform and GetViewport function do not give results on pure devices.

Simply insert your 3d point, the matrices and the viewport and you get the screen coordinates.


Thank you, it works. ;)

This topic is closed to new replies.

Advertisement