Another SGI graphics problem/solution to last one

Gary Tarolli tarolli at riva.esd.sgi.com
Fri Dec 8 10:21:56 AEST 1989


>From postnews Thu Dec  7 15:18:37 1989

In article <7254 at pt.cs.cmu.edu>, cycy at 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



More information about the Comp.sys.sgi mailing list