GLfloat ambient[] ={0.8,0.8,0.8,1.0};//环境光GLfloat diffuse[] ={0.8,0.0,0.8,1.0};//漫反射特性GLfloat specular[] ={1.0,0.0,1.0,1.0};//镜面反射光色GLfloat shininess[] ={50.0}; //镜面反射的光亮度glMaterialfv(GL_FRONT,GL_AMBIENT,ambient);glMaterialfv(GL_FRONT,GL_DIFFUSE,diffuse);glMaterialfv(GL_FRONT,GL_SPECULAR,specular);glMaterialfv(GL_FRONT,GL_SHININESS,shininess);gluSphere(obj,0.1,10,10);//用10X10个面绘制半径0.1的球面
|
|