Now that we've created the projection matrix, we can actually start creating the model and the view matrices, and you need to do that within our while loop. Let's take a look at the following steps:
- So, to begin with, we're going to get rid of the code that defines our transformation matrix, as we're no longer using that. We'll move the glActiveTexture() code before we activate our shader.
- After that, we're going to create the model and view matrices, for which we'll add the following code to our while loop after we have activated our shader. We'll begin with adding the glm:: mat4 model and glm::mat4 view matrix. The model will be model = glm::rotate (), and we'll just put an initial sort of rotation in rotate ...