I’m new to OpenGL, and so far I have a program that renders the teapot model that’s built into GLUT on the screen. However, I want to also have the teapot move. Right now I have a function that generates a 4x4 transformation matrix and another one that generates a 3x3 one, both using a few input values. I’ve printed out the contents of the matrixes and the numbers are correct. I just don’t know how to apply them to the existing teapot model, glutSolidTeapot(1.0);
The matrixes are generated using the Eigen library, but I’m mostly using it for the matrix multiplication. Eigen makes it very easy to access the individual values of the matrix, so if that format is going to cause problems. Is there any way I can extract the teapot’s matrix and replace its values with the ones in my matrix? Will I have to do so for every vertex in the teapot? If so, how?