Personal Iris lighting problems

Robert Ringrose ringrose at fibula.ai.mit.edu
Wed Mar 13 05:56:29 AEST 1991


I am running into a problem with lighting on the Personal Iris 4D/25.
(working with C and the gl libraries)

It works fine until I put in a call to a routine with the
following code, part of an attempt to get the current
projection and modelview matrices:


mmode(MPROJECTION);
mmode(MVIEWING);


I will grant that there is usually more code in between, but
I have observed the problem with the code in between commented
out AND the problem goes away when I comment out the
mmode(MPROJECTION) call.

Specifically, the problem is that the one infinite light I use,
bound to LIGHT1, is rotated and the rotation is increased every
time those two lines are executed.  I have tried re-defining and 
re-binding the light, without change.


Now, in an _old_ version of the manual it talks about keeping the
inverse transpose of part of the modelview matrix and updating
it as you go, for use with the lighting calculations.  Is it
possible that this matrix is getting messed up by the contents
of the projection matrix when you go through mmode(MPROJECTION)
with a non-unit projection matrix?  Or am I on the wrong track -
that section of the manual seems to be absent from version 4.0
(it was on 9-35 of the version 1.0 manual).



Suggestions, reasons, solutions, workarounds, etc. would be 
_greatly_ appreciated.  Please reply by E-mail to

ringrose at ai.mit.edu


	- Robert Ringrose


There's always one more bu6.



More information about the Comp.sys.sgi mailing list