程序员

关于OpenGL的一些记录

2018-10-20  本文已影响7人  xiyizhou16
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    
    glBegin(GL_TRIANGLES);
    glColor3f(1.0f, 1.0f, 0.0f);
    glVertex3f(0, 1.0, 0);
    glColor3f(1.0f, 0.0f, 0.0f);
    glVertex3f(-1, 0.5, 0);
    glColor3f(0.0f, 0.0f, 0.0f);
    glVertex3f(1, -1, 0);
    glEnd();
    glutSwapBuffers();
上一篇下一篇

猜你喜欢

热点阅读