Skip to content
Snippets Groups Projects
Commit 2a556fb2 authored by Nils Petter Skålerud's avatar Nils Petter Skålerud
Browse files

Added simple error callback for GLFW3 for testing purposes.

parent 22c8f171
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#include "GLFW/glfw3.h"
#include <memory>
#include <iostream>
namespace Engine
{
......@@ -34,6 +35,11 @@ namespace Engine
}
}
void error_callback(int error, const char* description)
{
std::cerr << "GLFW Error: " << description << std::endl;;
}
namespace Engine
{
namespace Application
......@@ -51,6 +57,8 @@ namespace Engine
data = std::make_unique<Data>();
data->isRunning = true;
glfwSetErrorCallback(error_callback);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment