Modifications to while loop

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:

  1. 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.
  2. 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 ...

Get Learn OpenGL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.