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

OpenGLを試すなら

 OpenGLを試すなら

010b92be8b6508ea7da9a0fa5ce3040b?s=128

Nobuyuki Nishiyama

July 24, 2019
Tweet

More Decks by Nobuyuki Nishiyama

Other Decks in Programming

Transcript

  1. QPUBUPUJQT 0QFO(-Λࢼ͢ͳΒ ΅ͬͪήʔϜσϕϩού ੢ࢁ৴ߦɹ

  2. ੿࡞ΞϓϦʮύζϧˍϞφʔΫʯ ສμ΢ϯϩʔυಥഁ

  3. ૬ख͕ڻ͘͜ͱ

  4. w6OJUZ΍6&ͳͲ͸࢖͍ͬͯ·ͤΜ w$JOEFSͱ͍͏ϑϨʔϜϫʔΫΛར༻ $  w0QFO(-Λ௚઀৮͍ͬͯΔ

  5. 0QFO(-

  6. wάϥϑΟοΫεϋʔυ΢ΣΞ޲͚ͷϥΠϒϥϦ w8JOEPXTɺNBD04ɺJ04ɺ"OESPJEͰ࢖͑Δ w$ɺ$ ɺ+BWBʜ w 8FC(-͸0QFO(-ͷ೿ੜ 0QFO(-

  7. Ͱɺ͜ͷ0QFO(-Λ৮ͬͯΈ͍ͨ ͱ͍͏ཁ๬͕૿͖͑ͯͨʂ

  8. ͱ͜Ζ͕ɺ৭ʑλΠϛϯά͕ѱ͘ ͯखࠒͳ਽ܗ͕ݟ౰ͨΒͳ͍

  9. ͷͰɺ࡞Γ·ͨ͠ʂ

  10. IUUQTHJUIVCDPNUFLOJTIJ0QFO(-5FNQBMUF

  11. w(-'8࠷৽൛ͱ਽ܗΛಉࠝͨ͠ϓϩδΣΫτ w 8JOEPXTͱNBD04྆ରԠ w (-'8͸0QFO(-ͷॳظԽ΍ͦͷଞͷॲཧΛݞ୅ΘΓ͢Δ 0QFO(-5FNQMBUFQSPHSBNCZ(-'8

  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; }
  13. 0QFO(-Λֶ΅͏ͱ͍ͯ͠Δਓʹ ͜ͷ਽ܗͷଘࡏΛڭ͑ͯཉ͍͠Ͱ ͢ʂ

  14. "QQMF͕ຊ֨తʹ0QFO(-Λ࡟আ ͯ͠͠·͏લʹʂʂʂ

  15. 0QFO(-ຊͳΒ

  16. ͓·͚ IUUQTHJUIVCDPNUFLOJTIJ(BNF5FNQMBUF

  17. ͜Μͳͷ࡞Γ·ͨ͠

  18. w5XJUUFS!NJOHBNF w'BDFCPPLNJOHBNF w(JU)VCUFLOJTIJ Ҏ্ʂ ΞϓϦ޷ධ഑৴தʂ