correct vertex position?

Started by
3 comments, last by opengl_coder 21 years, 3 months ago
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
Advertisement
instead of letting open gl do it you do it on your own and draw the triangle with the final coordinates
http://www.8ung.at/basiror/theironcross.html
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?
i have red the redbook but it never mention that something like that is possible

http://www.8ung.at/basiror/theironcross.html
Ok then, thanks : )

This topic is closed to new replies.

Advertisement