title: OpenGL glm::perspective() doesn't work properly, objects aren't 3d
body: <p>This is my game loop. I know I don't need to declare these variables twice, but I did them just in case:</p>
  
  <pre><code>while (!glfwWindowShouldClose(window))
      {
  
  
          GLfloat currentFrame = glfwGetTime();
          deltaTime = currentFrame - lastFrame;
          lastFrame = currentFrame;
  
  
          glfwPollEvents();
  
  
          glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  
          glUseProgram(shaderProgram);
          glm::mat4 view;
          view = glm::rotate(view, 50.0f, glm::vec3(0.0f, 0.0f, 1.0f));
          glm::mat4 projection;
          projection = glm::perspective(-45.0f, float(WIDTH / HEIGHT), 0.1f, 100.0f);
  
          GLint modelLoc = glGetUniformLocation(shaderProgram, "model");
          GLint viewLoc = glGetUniformLocation(shaderProgram, "view");
          GLint projLoc = glGetUniformLocation(shaderProgram, "projection");
  
          glUniformMatrix4fv(viewLoc, 1, GL_FALSE, glm::value_ptr(view));
          glUniformMatrix4fv(projLoc, 1, GL_FALSE, glm::value_ptr(projection));
  
          glBindVertexArray(VAO);
          glm::mat4 model;
          model = glm::scale(model, glm::vec3(0.5f, 0.5f, 0.5f));
          glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model));
          glDrawArrays(GL_TRIANGLES, 0, 36);
          glBindVertexArray(0);
  
          glUseProgram(shaderProgram2);
          glm::mat4 view2;
          view2 = translate(view2, glm::vec3(0.0f, 0.0f, -0.6f));
  
          GLint modelLoc2 = glGetUniformLocation(shaderProgram2, "lightmodel");
          GLint viewLoc2 = glGetUniformLocation(shaderProgram2, "lightview");
          GLint projLoc2 = glGetUniformLocation(shaderProgram2, "lightprojection");
  
          glm::mat4 model2;
          model2 = glm::scale(model2, glm::vec3(0.5f, 0.5f, 0.5f));
  
  
          glUniformMatrix4fv(viewLoc2, 1, GL_FALSE, glm::value_ptr(view2));
          glUniformMatrix4fv(projLoc2, 1, GL_FALSE, glm::value_ptr(projection));
  
          glUniformMatrix4fv(modelLoc2, 1, GL_FALSE, glm::value_ptr(model2));
  
          glBindVertexArray(lightVAO);
          glDrawArrays(GL_TRIANGLES, 0, 36);
          glBindVertexArray(0);
  
          glfwSwapBuffers(window);
      }
  </code></pre>
  
  <p>And this the output:</p>
  
  <p><a href="https://imgur.com/a/arEd7" rel="nofollow noreferrer">https://imgur.com/a/arEd7</a></p>
  
  <p>I'm not clear if glm::perspective() input should be radians or degrees, but I tried both and they all gave the same zoomed-in, non-3D result. I don't know what I'm doing wrong here. I'm doing these according to <a href="https://learnopengl.com/#!Lighting/Colors" rel="nofollow noreferrer">this</a> tutorial. My body of code looks exactly like the tutorial's save for a few classes that I created myself. What could be the problem here?</p>