how i can setup a spot light in opengl?
the code changes on the different versions of opengl?
How i know what type of opengl i’m use?
To query version of OpenGL on linux type
glxinfo | grep "OpenGL version"
on Windows there are number of programs which can do that, for example OpenGL Extension Viewer (GLView or sth. like that)
Spot light setup (old way, fixed pipeline - Opengl 1.x (mostly deprecated))
Spot light setup (new way, shaders, GLSL)