おふとんガレージ

技術的な忘備録とか雑記

2016-10-18から1日間の記事一覧

OpenGL入門 1日目

だいたい個人用作業メモ 当面の目標 C++とopenGLを用いてGUIで遊べるオセロを作る 今回までの作業内容 ウィンドウを表示する 初期状態のオセロの盤面の生成、配置 othello.cpp(10/18時点) #include <iostream> #include <GLUT/GLUT.h> #define BOARD_SIZE 8 #define NONE 0 #defin</glut/glut.h></iostream>…

windowsで書かれたopenGLプログラムをxcodeで走らせるときの覚え書き

個人的なメモ用Windows (Visual Studio) #include <glut.h> #include <math.h> //省略 int main(int argc, char* argv[]){ //省略 _sleep(20); //20ms毎に処理 } Xcode #include <GLUT/GLUT.h> //変更 #include <unistd.h> //追加 #include <math.h> //省略 int main(int argc, char* argv[]){ //省略 usleep</math.h></unistd.h></glut/glut.h></math.h></glut.h>…