gluProject in DX
there are some nice function in OpenGL that do Unprojection and projection to and from the 3D world. I was wondering if anyone know the math required to project a point form 3D space to screen space in DirectX much like gluProject does?
Much thanks.
Well, if your matrices are the same format as D3D, which I would hope they are, then you could simply reinterpret cast them to D3DX matrices and use those functions. But if you insist on doing it yourself...multiply through by ModelViewProjection concatenated matrix, divide by w, and then multiply component-wise by the viewport dimensions.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement