|
|
@ -227,9 +227,9 @@ void PendulumGLWidget::initializeGL(void)
|
|
|
|
glLoadIdentity();
|
|
|
|
glLoadIdentity();
|
|
|
|
// set positon of light0
|
|
|
|
// set positon of light0
|
|
|
|
GLfloat lightPos[4]=
|
|
|
|
GLfloat lightPos[4]=
|
|
|
|
{lightR * sin(lightTheta) * sin(lightPhi),
|
|
|
|
{(GLfloat)(lightR * sin(lightTheta) * sin(lightPhi)),
|
|
|
|
lightR * sin(lightTheta) * cos(lightPhi),
|
|
|
|
(GLfloat)(lightR * sin(lightTheta) * cos(lightPhi)),
|
|
|
|
lightR * cos(lightTheta),
|
|
|
|
(GLfloat)(lightR * cos(lightTheta)),
|
|
|
|
0};
|
|
|
|
0};
|
|
|
|
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
|
|
|
|
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
|
|
|
|
// set positon of light1
|
|
|
|
// set positon of light1
|
|
|
|