Results 1 to 3 of 3

Thread: Glut version of D3DXVec2TransformCoord() ?

  1. #1

    Glut version of D3DXVec2TransformCoord() ?

    Is there a function like D3DXVec2TransformCoord() in OpenGL/GLUT? According to MSDN docs:

    "This function transforms the vector, pV (x, y, 0, 1), by the matrix, pM, projecting the result back into w=1."

    Thanks in advance!
    -Marco

    EDIT: I can do the transformation, but I have no idea what they mean with projecting the result back into w=1. :?

  2. #2

    Re: Glut version of D3DXVec2TransformCoord() ?

    Quote Originally Posted by cronodragon
    EDIT: I can do the transformation, but I have no idea what they mean with projecting the result back into w=1. :?
    Just divide the contents of 3D vector (including "w" itself) by "w". You may also need to multiple the result by your viewport size and center it on the screen.

  3. #3

    Glut version of D3DXVec2TransformCoord() ?

    Ready! Thanks. No need to use the viewport or centering on the screen.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •