0504
Examples: [source][data][win32][linux][mac][sgi] (these examples are for all following OpenGL introductions)
glut32.dll
GLUT32.DLL加入windows
主題:點線面色彩
glColor3f (r,g,b);
glVertex3f(x,y,z);
glVertex2f(x,y);
3f=3個浮點數;
2f=2個浮點數;
邊=EDGE
VERTEX=頂點
glBegin(...)
glEnd();
主題茶壺顏色
static void display(void)
{
glColor3f(1,0,0);
glutSolidTeapot(0.3);
glutSwapBuffers();
}
實作 程式碼:
茶壺
後面函式
int main(int argc, char *argv[])
{glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("GLUT Shapes");
glutDisplayFunc(display);
glutMainLoop();
沒有留言:
張貼留言