ktl@wag240.wag.caltech.edu (Kian-Tat Lim) (09/26/90)
We've got a user who is attempting to render spheres using hardware lighting (one infinite light source) on a 4D/25TG and a 4D/340GTX. He wants to do real-time movements, also. He has encountered a strange situation in which identical code acts differently on the TG and GTX. In particular, it seems that normals pointing directly toward the viewer are being flipped to point away on the TG. There may be other transformation-related problems, too. His code is somewhat (hah!) convoluted, but basically it looks like this: winopen RGBmode gconfig lsetdepth zbuffer mmode(MVIEWING) loadmatrix(identity) lmdef/lmbind stuff translation getmatrix(orig) loadmatrix(identity) getmatrix(current) ortho doublebuffer gconfig loadmatrix(identity) getmatrix(current) ortho doublebuffer gconfig multmatrix(current) getmatrix(current) multmatrix(orig) getmatrix(user) loadmatrix(identity) render All the matrix stuff is supposed to get the current transformation matrix (with rotations/translations from dials and the original translation from "orig") into "user" so that it can be used by the rendering code. In the above, all of these matrices should be the identity, except for "orig" and "user". I wasn't too happy about the multiple calls to gconfig, but he claims that the normals are flipped even on GTX when he doesn't do things this way. Does anyone have any idea what could be going on here? -- Kian-Tat Lim (ktl@wag240.wag.caltech.edu, KTL @ CITCHEM.BITNET, GEnie: K.LIM1)