Writing text in 3d coordinates
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!
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.
Simply insert your 3d point, the matrices and the viewport and you get the screen coordinates.
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
Popular Topics
Advertisement