opengl rappresentation of light

I would create a rapresentation of each light model in opengl ,for learning, i must get the opengl light model equation and solve it? how? or there are more simple model to draw?

Take a look at for a description of how to recreate the fixed function pipeline light types using GLSL shaders.

Thanks, but i’m not be clear.
I would create shapes of light rappresentation like a circle for a point light , a triangle for spot light an oriented rectaangle for directional ecc…
And i wont do it based on real in scene parameters of the lights(the light that are present in the scene).

Ok, if I understand correctly you want to access the light parameters?

void glGetLightfv( GLenum light,
                   GLenum pname,
                   GLfloat *params )
void glGetLightiv( GLenum light,
                   GLenum pname,
                   GLint *params )

see for details.