Hey everyone and first of all thanks for helping me!
I’m an absolute beginner with openGL. I tried to a lamp standing on a desk with very basic shapes. Now I want to add a spotlight shining on the desk. I already tried the following:
You aren’t setting any of the colours (GL_AMBIENT, GL_DIFFUSE or GL_SPECULAR). While GL_LIGHT0 has (1,1,1,1) as the initial value for both diffuse and specular, all other lights have (0,0,0,1) so you need to change that if you want the light to have any effect.
Does your object have normals? Lighting (other than ambient) can’t work without them. Do the normals have the correct orientation? Vertices whose normals point away from the light won’t be illuminated.