• Advertisement

Archived

This topic is now archived and is closed to further replies.

correct vertex position?

This topic is 5532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lets say that I have a triangle and a matrix Mat[16] with some kind of unimportant values. I want to affect my triangle by multiplying it with Mat. Like this: glMultMatrixf(Mat); glBegin(GL_TRIANGLES); glVertex3f(1x, 1y, 1z); glVertex3f(2x, 2y, 2z); glVertex3f(3x, 3y, 3z); glEnd(); How can I get hold of the new vertex positions for my triangle? (The vertex position after it has been affected by Mat, the vertex position that opengl draws to the screen..) Thanks! opengl_coder

Share this post


Link to post
Share on other sites
Advertisement
instead of letting open gl do it you do it on your own and draw the triangle with the final coordinates

Share this post


Link to post
Share on other sites
Thank you for your answer Basiror.

Yes, that probably the best way to do it.

But there should be a way to get hold of the model matrix or something right before the triangle is drawn to the screen.
The new positions must be stored/calculated somewhere?

Share this post


Link to post
Share on other sites
i have red the redbook but it never mention that something like that is possible

Share this post


Link to post
Share on other sites

  • Advertisement