1
#include
<GL/glut.h>
2
3
void
display()
4
{
5
glClear(GL_COLOR_BUFFER_BIT);
6
7
glBegin(GL_POLYGON);
8
glVertex2f(-0.5f,-0.5f);
9
glVertex2f(-0.5f,0.5f);
10
glVertex2f(0.5f,0.5f);
11
glVertex2f(0.5f,-0.5f);
12
glEnd();
13
14
glFlush();
15
}
16
17
int
main(int
argc,char
**argv)
18
{
19
glutInit(&argc,argv);
20
glutCreateWindow("Hello,world!"
);
21
glutDisplayFunc(display);
22
glutMainLoop();
23
return
0
;
24
}
glutDemo
最新推荐文章于 2020-08-01 19:23:08 发布
1492

被折叠的 条评论
为什么被折叠?



