首页 > 代码库 > opengl 创建新窗口

opengl 创建新窗口

#include "GL/glut.h"
void RenderSceneCB()
{
glClear(GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowSize(1024,768);
glutInitWindowPosition(100,100);
glutCreateWindow("Tutorial 01");
glutDisplayFunc(RenderSceneCB);
glClearColor(0.0f,0.0f,0.0f,0.0f);
glutMainLoop();
}

技术分享

技术分享

 

opengl 创建新窗口