Sign in to follow this  
ArgusMaker

[DX9 C++] Vertex Position

Recommended Posts

ArgusMaker    102
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.

Share this post


Link to post
Share on other sites
kauna    2922
[quote name='ArgusMaker' timestamp='1307360165' post='4820042']
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.
[/quote]



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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this