Minor name changes and cleanup in main.cpp and camera.hpp.

This commit is contained in:
Aleksander Rognhaugen
2016-09-20 21:00:49 +02:00
parent fd306e2e7d
commit 2ecd0b9910
6 changed files with 44 additions and 83 deletions

View File

@@ -3,36 +3,36 @@
#include "gloom/gloom.hpp"
void runProgram(GLFWwindow* mWindow)
void runProgram(GLFWwindow* window)
{
// Set GLFW callback mechanism(s)
glfwSetKeyCallback(mWindow, keyboardCallback);
glfwSetKeyCallback(window, keyboardCallback);
// Enable depth (Z) buffer (accept "closest" fragment)
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
// Configure miscellaneous OpenGL settings
// Configure miscellaneous OpenGL settings
glEnable(GL_CULL_FACE);
// Set default colour after clearing the colour buffer
glClearColor(0.3f, 0.3f, 0.4f, 1.0f);
// Set up your scene here (create Vertex Array Objects, etc)
// Set up your scene here (create Vertex Array Objects, etc.)
// Rendering Loop
while (!glfwWindowShouldClose(mWindow))
while (!glfwWindowShouldClose(window))
{
// Clear colour and depth buffers
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Draw your scene here
// Handle other events
glfwPollEvents();
// Draw your scene here
// Flip buffers
glfwSwapBuffers(mWindow);
glfwSwapBuffers(window);
}
}