OpenGL(GLUT)调整窗口大小时重绘

void reshape(int w, int h)
{
    glViewport(0, 0, w, h);
    myDisplay();
}

...

    glutDisplayFunc(myDisplay);
    glutReshapeFunc(reshape);

 

posted @ 2020-07-24 02:32  天天2023  阅读(472)  评论(0)    收藏  举报