Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!genbank!ames!sgi!tarolli@riva.esd.sgi.com From: tarolli@riva.esd.sgi.com (Gary Tarolli) Newsgroups: comp.sys.sgi Subject: Re: Another SGI graphics problem/solution to last one Summary: DGL problem - lmdef call Message-ID: <45948@sgi.sgi.com> Date: 7 Dec 89 23:21:56 GMT References: <7254@pt.cs.cmu.edu> Sender: tarolli@riva.esd.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 33 From postnews Thu Dec 7 15:18:37 1989 In article <7254@pt.cs.cmu.edu>, cycy@isl1.ri.cmu.edu (Scum) writes: > > We want to use dgl (Distributed Graphics Library) and have things appear > on another monitor's screen. That works; however, on the local screen there > is a problem with lighting in one of the windows, and it's pretty weird. The > objects appear, and they appear in the correct material colour. However, the > lighting model or the lights seem to be screwed up. The objects are just > coloured flat now. No shadows, no shading, no perspective, nothing. This worked > in gl, but it seems there is something missing in dgl. By the way, normals are > set. I tried depth cueing and z-buffering with dgl on the local, remote and > both screens, and those worked. The lighting works when I link gl, but not dgl. I think you stumbled across one of the commands that behave slightly differentlyin the GL than in the DGL. The command is lmdef, and the GL ignores the third parameter whereas the DGL requires it. People normally, by habit, put 0 as the 3rd parameter and the GL works fine. If you read the man page , the 3rd parameter is supposed to be the number of floats in the 4th argument. The DGL looks at this value to determine how many floats to send. Thus if you are like most people and set it to 0, the DGL will send 0 floats and thus lmdef wont work and the result will be just like what you are experiencing - total weirdness. There is also a slight difference in behavior if you use NULL for the 4th parameter and dont specify 0 for the 3rd. I dont suspect this is your problem, however. Check the 3rd parameter and make sure it is set correctly, that should fix your problem. -- Gary Tarolli