[ODE] Light Sources?

Erwin de Vries erwin at vo.com
Tue Jun 10 15:13:01 2003


This is off topic. You could try an opengl mailing list.

Erwin

----- Original Message -----
From: "Danesh Tarapore" <daneshtarapore@yahoo.com>
To: <ODE@q12.org>
Sent: Tuesday, June 10, 2003 23:07
Subject: [ODE] Light Sources?


> 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).