i tryed to make a window on centOS,but why none window appeared?
int main(void)
{
GLFWwindow* window = NULL;
glfwSetErrorCallback(error_callback);
if(!glfwInit())
{
exit(EXIT_FAILURE);
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);
if (!window)
{
glfwTerminate();
printf("%s\n","create failed!" );
exit(EXIT_FAILURE);
}
// glfwShowWindow(window);
printf("%s\n","create success!" );
while(1);
}
[root@localhost glfw_test]# ./main
create success!
thanks for you reading.