OpenGLを試すなら

 OpenGLを試すなら

010b92be8b6508ea7da9a0fa5ce3040b?s=128

Nobuyuki Nishiyama

July 24, 2019
Tweet

Transcript

  1. 5.
  2. 12.

    ਽ܗൈਮ #include <GLFW/glfw3.h> int main(void) { GLFWwindow* window; if (!glfwInit())

    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; }