Hi, I've got a problem. In some case my app update the openGL context calling initalizeGL;
that's ok; but I see that in this case, the light seems fall down; my background white lines appear more dark; I see that I increment y value of light position up to 4 or 5, the lines appear more white (I think this ok), and when openGL context is update, the light don't fall down; Any hints?
Qt Code:
  1. //initializeGL()
  2. GLfloat light_position[] = {0.0, 0.0, 2.0, 0.0};
  3. glLightfv(GL_LIGHT0, GL_POSITION, light_position);
  4. glEnable(GL_LIGHTING);
  5. glEnable(GL_LIGHT0);
  6. glEnable(GL_NORMALIZE);
To copy to clipboard, switch view to plain text mode