View Full Version : opengl rappresentation of light
giuseppe500
06-29-2010, 08:00 AM
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.
carsten neumann
06-29-2010, 12:11 PM
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.
giuseppe500
06-30-2010, 01:01 AM
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.
carsten neumann
07-07-2010, 08:03 AM
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.