fixed some compile errors
This commit is contained in:
parent
a5b5a7fdff
commit
a3ebd84cfc
@ -1,14 +1,13 @@
|
|||||||
#include "GLApp.h"
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
#include "GLApp.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
bool wired = false;
|
bool wiredFlag = false;
|
||||||
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
|
void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||||
{
|
{
|
||||||
if (key == GLFW_KEY_M && action == GLFW_PRESS) {
|
if (key == GLFW_KEY_M && action == GLFW_PRESS) {
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, wired ? GL_FILL : GL_LINE);
|
glPolygonMode(GL_FRONT_AND_BACK, wiredFlag ? GL_FILL : GL_LINE);
|
||||||
wired = !wired;
|
wiredFlag = !wiredFlag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ void GLApp::init() {
|
|||||||
|
|
||||||
_window = glfwCreateWindow(1024, 1024, "OpenGL", nullptr, nullptr); // Windowed
|
_window = glfwCreateWindow(1024, 1024, "OpenGL", nullptr, nullptr); // Windowed
|
||||||
glfwMakeContextCurrent(_window);
|
glfwMakeContextCurrent(_window);
|
||||||
glfwSetKeyCallback(_window, key_callback);
|
glfwSetKeyCallback(_window, keyCallback);
|
||||||
|
|
||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user