GL Lighting POSITION

Kathy Kuba kuba at hpfcdj.HP.COM
Wed Sep 12 03:08:55 AEST 1990


> Probably the most common problem encountered with lighting is that light
> positions are transformed by the current ModelView matrix when the light is
> bound (i.e. when lmbind(LIGHTn,foo) is called).  As a result you must be
> very careful about what ModelView matrix is present when a light is bound.
> In releases previous to 3.3, the ModelView matrix was undefined until it was
> first loaded (typically with an identity matrix).  In release 3.3, the
> ModelView matrix is initialized to identity when mmode(MVIEWING) is first
> called (putting the GL into multimatrix mode, required for lighting and many
> other advanced GL features).  It is likely that some error has been made in
> the matrix/lmbind sequence, and that this error is affected by the differences
> between the 3.2 and 3.3 software releases.
> 
thanks for the pointer!  it ended up being a sequence error:  i was
specifying my ortho before my mmode.  rearranging these on 3.3 fixed the 
problem, and adding an additional loadmatrix(identity) solved it on 3.2. 
my 3.2 code also runs fine on 3.3.  thanks again. 

kathy



More information about the Comp.sys.sgi mailing list