发布网友 发布时间:2024-09-28 07:02
共1个回答
热心网友 时间:8分钟前
void myinit(void)
{
glClearColor(1.0f,1.0f,1.0f,1.0f);
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH);
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
glEnable (GL_LIGHTING);
glEnable (GL_LIGHT0);
glFrontFace(GL_CW);
glDisable( GL_CULL_FACE);
}