return -1; window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); if (!window) { glfwTerminate(); return -1; } glfwMakeContextCurrent(window); glfwSwapInterval(1); // メインループ while (!glfwWindowShouldClose(window)) { glClear(GL_COLOR_BUFFER_BIT); // ここに描画処理を書く glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate(); return 0; }