View Full Version : opengl rappresentation of light
06-29-2010, 08:00 AM
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?
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.
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).
07-07-2010, 08:03 AM
Ok, if I understand correctly you want to access the light parameters?
void glGetLightfv( GLenum light,
GLfloat *params )
void glGetLightiv( GLenum light,
GLint *params )
see http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml for details.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.