[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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV>if that is the case, then what is the use of glLightfv (GL_LIGHT0, GL_SPOT_DIRECTION, light_direction);&nbsp; when the first functio itself will tke care of the direction.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>secondly if I set up the light src as</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; static GLfloat light_position[] = { -0.9, 0.0,0.15, 0.0 };</DIV>
<DIV>&nbsp; temp = 45;<BR><BR>&nbsp; glLightfv (GL_LIGHT0, GL_POSITION, light_position);<BR>&nbsp; glLightfv (GL_LIGHT0, GL_SPOT_CUTOFF,&amp;temp);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV>hoping for a solution,</DIV>
<DIV>regards,</DIV>
<DIV>danesh.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</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--