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

OpenGLを試すなら

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

 OpenGLを試すなら

Avatar for Nobuyuki Nishiyama

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