Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!wuarchive!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!ai-lab!fibula!ringrose From: ringrose@fibula.ai.mit.edu (Robert Ringrose) Newsgroups: comp.sys.sgi Subject: Personal Iris lighting problems Summary: mmode is affecting the lighting model Message-ID: <13917@life.ai.mit.edu> Date: 12 Mar 91 19:56:29 GMT References: Sender: news@ai.mit.edu Distribution: comp Organization: MIT Artificial Intelligence Laboratory Lines: 45 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@ai.mit.edu - Robert Ringrose There's always one more bu6.