guille
03-30-2001, 06:56 AM
Hi, first of all I am sorry for my English...
I have a simple light like this:
glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
glLightfv( GL_LIGHT0, GL_SPECULAR, LightSpecular);
glLightfv(GL_LIGHT0, GL_POSITION,LightPosition0);
glEnable(GL_LIGHT0);
glEnable( GL_LIGHTING );
and I am drawing some polygons that I can move using the mouse. In my drawing routine a do like this:
ClearGLScene();
glPushMatrix();
glTranslated(0,0,zoom);
glRotated(xrot, 1.0, 0.0, 0.0);
glRotated(yrot, 0.0, 1.0, 0.0);
glRotated(zrot, 0.0, 0.0, 1.0);
... Drawing the polygons ...
glPopMatrix();
I want the light fixed and the polygons moving... Is it something about pushing the matrix and then to disable the lighting?
Thank you all.
I have a simple light like this:
glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
glLightfv( GL_LIGHT0, GL_SPECULAR, LightSpecular);
glLightfv(GL_LIGHT0, GL_POSITION,LightPosition0);
glEnable(GL_LIGHT0);
glEnable( GL_LIGHTING );
and I am drawing some polygons that I can move using the mouse. In my drawing routine a do like this:
ClearGLScene();
glPushMatrix();
glTranslated(0,0,zoom);
glRotated(xrot, 1.0, 0.0, 0.0);
glRotated(yrot, 0.0, 1.0, 0.0);
glRotated(zrot, 0.0, 0.0, 1.0);
... Drawing the polygons ...
glPopMatrix();
I want the light fixed and the polygons moving... Is it something about pushing the matrix and then to disable the lighting?
Thank you all.