win7配置opengl
番茄系统家园 · 2021-08-27 01:50:18

7.下面来看一个简单的例子:
#
#
(void)
{
(1.0,1.0,1.0,0.0);
();
(0.0,,0.0,);
}
voidlineSegment(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
glBegin(GL_LINES);
glVertex2i(180,15);
glVertex2i(10,145);
glEnd();
glFlush();
}
intmain(intargc,char**argv)
{
glutInit(argc,argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowPosition(50,100);
glutInitWindowSize(400,300);
glutCreateWindow("ExampleOpenGLProgram");
init();
glutDisplayFunc(lineSegment);
glutMainLoop();
}
免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/post/49560.html。猜你喜欢
最新应用
热门应用

