I need to turn on the highlight in the OpenGL image, but I donβt know how to set the spotlight correctly, as in the following figure:

At the moment, I tried to use a different lighting mode, but the result is as follows: (

I am attaching you the code that I used for my result. What's wrong?
float specref[] = { 1.0f, 1.0f, 1.0f, 1.0f };
// Light values and coordinates
float ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };
float diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };
float specular[] = { 1.0f, 1.0f, 1.0f, 1.0f};
float lightPos[] = { 0.0f, -150.0f, -150.0f, 1.0f };
glEnable ( GL_LIGHTING ) ;
glLightfv(GL_LIGHT0,GL_AMBIENT, ambientLight);
glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuseLight);
glLightfv(GL_LIGHT0,GL_SPECULAR,specular);
glLightfv(GL_LIGHT0,GL_POSITION,lightPos);
glEnable(GL_LIGHT0);
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,specref);
glMateriali(GL_FRONT_AND_BACK,GL_SHININESS,128);
glEnable ( GL_COLOR_MATERIAL ) ;
glClearColor (1.0, 1.0, 1.0, 1.0);
glColor3f(0.0,0.0,0.0);
Edit 11/11/2011 0.39 CET
I also add a display () function called by glutDisplayFunc (display);
void display(void)
{
[...]
glColor3f(0.0,1.0,1.0);
glBegin(GL_QUADS);
for(i=0;i<NVERT-1;i++) {
for (j=0;j<NVERT-1;j++) {
glVertex3f( (GLfloat)((sb[i*NVERT+j]).x()),
(GLfloat)((sb[i*NVERT+j]).y()),
(GLfloat)((sb[i*NVERT+j]).z()));
glVertex3f( (GLfloat)((sb[i*NVERT+j+1]).x()),
(GLfloat)((sb[i*NVERT+j+1]).y()),
(GLfloat)((sb[i*NVERT+j+1]).z()));
glVertex3f( (GLfloat)((sb[(i+1)*NVERT+j+1]).x()),
(GLfloat)((sb[(i+1)*NVERT+j+1]).y()),
(GLfloat)((sb[(i+1)*NVERT+j+1]).z()));
glVertex3f( (GLfloat)((sb[(i+1)*NVERT+j]).x()),
(GLfloat)((sb[(i+1)*NVERT+j]).y()),
(GLfloat)((sb[(i+1)*NVERT+j]).z()));
}
}
glEnd();
glFlush();
}
In practice, with the display, I write small areas that make up the 2 Β° shape presented by me (I skipped the algorithm for calculating the points of each area because it works).
My goal is to get a result similar to Figure 1 for lightning and rendering the figure, but I only got the result in Figure 2.
, , (, ).