Jump to content
  • Advertisement

Archived

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

opengl_coder

correct vertex position?

This topic is 5652 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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!