Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!mips!sgi!bruceh@brushwud.asd.sgi.com From: bruceh@brushwud.asd.sgi.com (Bruce R. Holloway) Newsgroups: comp.sys.sgi Subject: Re: Replacing the perspective matrix. Keywords: loadmatrix, perspective, viewing mode Message-ID: <62902@sgi.sgi.com> Date: 26 Jun 90 19:53:24 GMT References: <696@celia.UUCP> <62846@sgi.sgi.com> Sender: bruceh@brushwud.asd.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 37 In article <62846@sgi.sgi.com>, tarolli@riva.esd.sgi.com (Gary Tarolli) writes: > In article <696@celia.UUCP>, keith@celia.UUCP (Keith Goldfarb) writes: > > > > What I want to do is to replace the current projection matrix > > (while in viewing mode) with one of my choosing with a call > > like loadmatrix(). Does such a call exist? > > The way to do this is to get into MPROJECTION mode, using > > mmode(MPROJECTION); > > and then use loadmatrix, and return to the previous mmode. In MVIEWING > mode, loadmatrix will load the model-view matrix, so that is why you must > get into MPROJECTION mode. This should work, but there may be a bug on > the GT/GTX machines (I think this was reported and fixed in the just > released 3.3 version). Gary is correct, except that the bug was replicated in the original Personal Iris graphics. I think this is the 4D/20 model only. Even though the PI & GT were fixed in 3.3 so that Gary's advice will work, there are still some limitations on the projection matrix you load. Basically, there can be no rotation in the projection matrix & any plane of projection must intersect only the z-axis. The matrices created by the GL calls which set the projection matrix all qualify. If you find it really necessary to load a more general projection matrix, you may report a bug. (I can't guarantee to fix it!) The GT graphics has been out for over two years & only one customer ever complained. He was satisfied with the 3.3 version. To the best of my knowledge, the new VGX graphics will handle a fully general projection matrix. Feel free to email me if you have further questions. There is a five- page technical report that is about 90% complete, but it was sort of written for internal consumption. Regards, bruceh