void display (void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW); //Switch to the drawing perspective
glLoadIdentity();
light();
glTranslatef(-(xpos), (ypos), -(zpos)) ;
glRotatef(-cameraAngle, 1.0f, 0.0f, 0.0f); //Rotate the camera
glColor4f(0, 1, 0, 1);
//renderPrimitive(); // Render the primitive
//glCallList(DLid);
//glRotatef(angle, 1.0f, 0.0f, 0.0f); //togliere i commenti se si vuole far ruotare l'immagine in automatico
heightMap->Render();
glutSwapBuffers();
glFlush(); // Flush the OpenGL buffers to the window
}