[DX9 C++] Vertex Position

Started by
2 comments, last by Buckeye 12 years, 10 months ago
Hi there!
I was wondering if you can get the coordinates in the window of a 3d rendered vertex, in other words where in the window directx draws the vertex.
Advertisement

Hi there!
I was wondering if you can get the coordinates in the window of a 3d rendered vertex, in other words where in the window directx draws the vertex.




Sure you can get them in many ways. One way is to transform your 3d position with the world-view-projection matrices and doing division by the w component. Then scale the result with half screen width and half height and offset the coordinate with the same values. Now this is the position in the framebuffer.

What are you trying to accomplish?
my task is secret
D3DXVec3Project will also serve.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement