1.建立github.com
2.新增github專案倉庫
3.畫出一個圓
4.位置右移的球
#include <GL/glut.h>
#include <math.h>
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(1,0,0);
glutSolidSphere(0.7,30,30);
glColor3f(1,1,0);
glutSolidSphere(0.5,30,30);
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("Week03_circle");
glutDisplayFunc(display);
glutMainLoop();
}
6.執行



沒有留言:
張貼留言