3 #include <GLFW/glfw3.h>
15 bool is_inited(
false);
17 __attribute__((constructor))
21 if (is_inited)
return true;
25 std::cerr <<
"GLFW initialization failed" << std::endl;
32 QUORI_FACE_TRACE(glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE));
38 __attribute__((destructor))
41 if (!is_inited)
return;
51 throw std::runtime_error(
reinterpret_cast<const char *
>(gluErrorString(error)));