Hy.
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?
Thanks.
Take a look at http://www.lighthouse3d.com/opengl/glsl/index.php?lights 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).
by.
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 http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml for details.