Hi. I’m developing an opengl application using Delphi 5.0 under windows and Kylix 3.0 under Linux.
I’ve found a strange problem problem when working in Linux, but I’m not sure whether it’s an opengl issue, a kylix issue (or maybe I’m just doing something wrong).
Here is the problem: I have some display lists holding quadric objects (cylinders, spheres, etc.). When I call the display list corresponding to the cylinder, the lighting is wrong (too bright). I have to point out that I perform a rescaling using the glScaled function, but I enable the normals normalization before the scaling. When using other quadric objects, spheres for example, no problem is detected.
Here is the initialization code of the display list:
QTube:= gluNewQuadric;
gluQuadricNormals(QTube, GLU_SMOOTH);
gluQuadricTexture(QTube, GL_TRUE);
LTube:= glGenLists(1);
glNewList(LTube, GL_COMPILE);
gluCylinder(QTube, 1.0, 1.0, 1.0, 10, 1);
glEndList;
and here is the drawing code:
glEnable(GL_NORMALIZE);
glScaled(R, R, L);
glCallList(LTube);
glDisable(GL_NORMALIZE);
Note that the scaling is non-uniform (R <> L). When R = L the problem dissapears.
The problem also dissapears if I don’t use the diplay list, this is, when I replace glCallList(LTube) by
gluCylinder(QTube, 1.0, 1.0, 1.0, 10, 1)
Thanks,
Andres