Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OpenGLを試すなら

 OpenGLを試すなら

Nobuyuki Nishiyama

July 24, 2019
Tweet

More Decks by Nobuyuki Nishiyama

Other Decks in Programming

Transcript

  1. ਽ܗൈਮ #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; }