Write a C or C++ program, using the OpenGL library and programmable shaders, that draws a multi-colored torus (donut) and allows you to move the camera around it in all dimensions: x, y, and z translations, as well as roll, pitch, and yaw rotations. All of these operations should be in camera coordinates, i.e. when you "roll", the image should appear to rotate around the line perpendicular to the screen, not necessarily around the z axis of the torus.
Hints:
glUniformMatrix4fv
function, which has a
transpose
argument that (according to the documentation) "must be
GL_FALSE
".
However, it seems that Angel's matrix class is stored in the opposite
order from what OpenGL wants, so to get my program working I
needed to use GL_TRUE
instead.