windowsで書かれたopenGLプログラムをxcodeで走らせるときの覚え書き
個人的なメモ用
#include <glut.h> #include <math.h> //省略 int main(int argc, char* argv[]){ //省略 _sleep(20); //20ms毎に処理 }
#include <GLUT/GLUT.h> //変更 #include <unistd.h> //追加 #include <math.h> //省略 int main(int argc, char* argv[]){ //省略 usleep(20000); //変更 // 20ms == 20000μs }