[ODE] Light Sources?
Danesh Tarapore
daneshtarapore at yahoo.com
Tue Jun 10 14:06:02 2003
--0-1050857050-1055279227=:6665
Content-Type: text/plain; charset=us-ascii
Hi,
Does anyone kow howto setup multiple light sources or for that matter, just setup the position and direction of a light src.
in the function glLightfv (GL_LIGHT0, GL_POSITION, light_position); light position has the coordinates of the light vector but with respect to what, the origin?
if that is the case, then what is the use of glLightfv (GL_LIGHT0, GL_SPOT_DIRECTION, light_direction); when the first functio itself will tke care of the direction.
secondly if I set up the light src as
static GLfloat light_position[] = { -0.9, 0.0,0.15, 0.0 };
temp = 45;
glLightfv (GL_LIGHT0, GL_POSITION, light_position);
glLightfv (GL_LIGHT0, GL_SPOT_CUTOFF,&temp);
the intensity of the objects changes as I change the viewpoint of the window. by changes i mean (orignal color/black)
hoping for a solution,
regards,
danesh.
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
--0-1050857050-1055279227=:6665
Content-Type: text/html; charset=us-ascii
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>Does anyone kow howto setup multiple light sources or for that matter, just setup the position and direction of a light src.</DIV>
<DIV> </DIV>
<DIV>in the function glLightfv (GL_LIGHT0, GL_POSITION, light_position); light position has the coordinates of the light vector but with respect to what, the origin? </DIV>
<DIV> </DIV>
<DIV>if that is the case, then what is the use of glLightfv (GL_LIGHT0, GL_SPOT_DIRECTION, light_direction); when the first functio itself will tke care of the direction.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>secondly if I set up the light src as</DIV>
<DIV> </DIV>
<DIV> static GLfloat light_position[] = { -0.9, 0.0,0.15, 0.0 };</DIV>
<DIV> temp = 45;<BR><BR> glLightfv (GL_LIGHT0, GL_POSITION, light_position);<BR> glLightfv (GL_LIGHT0, GL_SPOT_CUTOFF,&temp);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>the intensity of the objects changes as I change the viewpoint of the window. by changes i mean (orignal color/black)</DIV>
<DIV> </DIV>
<DIV>hoping for a solution,</DIV>
<DIV>regards,</DIV>
<DIV>danesh.</DIV>
<DIV> </DIV>
<DIV> </DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Free <a href="http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com">online calendar</a> with sync to Outlook(TM).
--0-1050857050-1055279227=:6665--