Add debug printout to glfwInit
This commit is contained in:
parent
317bf89ea0
commit
94718e4608
@ -160,7 +160,9 @@ static void enable_opengl_debug_context(){
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
m_window = glfwCreateWindow(width, height, title, nullptr, nullptr);
|
||||
if(!m_window){
|
||||
debug_print_error("Unable to create a GLFW window!\n");
|
||||
const char* err;
|
||||
debug_print_error("Unable to create a GLFW window! %d\n", glfwGetError(&err));
|
||||
debug_print_error("%s\n", err);
|
||||
destroy();
|
||||
return;
|
||||
}
|
||||
@ -198,7 +200,7 @@ static void enable_opengl_debug_context(){
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, w.get_context_vmaj());
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, w.get_context_vmin());
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
// glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_RESIZABLE, w.is_resizable());
|
||||
glfwWindowHint(GLFW_DECORATED, w.is_decorated());
|
||||
glfwWindowHint(GLFW_FLOATING, w.is_always_on_top());
|
||||
@ -209,7 +211,9 @@ static void enable_opengl_debug_context(){
|
||||
auto size = w.get_size();
|
||||
m_window = glfwCreateWindow(size.x(), size.y(), m_title, nullptr, nullptr);
|
||||
if(!m_window){
|
||||
debug_print_error("Unable to create a GLFW window!\n");
|
||||
const char* err;
|
||||
debug_print_error("Unable to create a GLFW window! %d\n", glfwGetError(&err));
|
||||
debug_print_error("%s\n", err);
|
||||
destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user