Archived

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

opengl_coder

correct vertex position?

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
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