From a3ebd84cfc4c350c5647249d7714268eea59d762 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Tue, 28 Jul 2015 08:47:31 +0300 Subject: [PATCH] fixed some compile errors --- src/GLApp.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/GLApp.cpp b/src/GLApp.cpp index e21fdb1..2d6bd55 100644 --- a/src/GLApp.cpp +++ b/src/GLApp.cpp @@ -1,14 +1,13 @@ -#include "GLApp.h" #include - +#include "GLApp.h" #include -bool wired = false; -void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) +bool wiredFlag = false; +void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_M && action == GLFW_PRESS) { - glPolygonMode(GL_FRONT_AND_BACK, wired ? GL_FILL : GL_LINE); - wired = !wired; + glPolygonMode(GL_FRONT_AND_BACK, wiredFlag ? GL_FILL : GL_LINE); + wiredFlag = !wiredFlag; } } @@ -48,7 +47,7 @@ void GLApp::init() { _window = glfwCreateWindow(1024, 1024, "OpenGL", nullptr, nullptr); // Windowed glfwMakeContextCurrent(_window); - glfwSetKeyCallback(_window, key_callback); + glfwSetKeyCallback(_window, keyCallback); glewExperimental = GL_TRUE; GLenum err = glewInit();