question on gl
Andrew V. Royappa
avr at cs.purdue.EDU
Wed Apr 3 13:26:58 AEST 1991
OK, I've read the articles by Bruce Holloway & Gary Tolling. The
articles were somewhat dense; unfortunately, so am I. I'm
still not sure what I'm doing wrong.
Here's what I`m doing, for *perspective* projection:
(1) extend from 3D to 4D coordinates; multiply by MVP matrices given at
back of gl user's guide.
(2) divide 4D result by w to return to 3D
(3) clip resulting geometry against -1.0<=x,y,z<=1.0
Now, I'm interested in correctness more than speed (as I'm doing this
in software, over X, I'm obviously not interested in speed).
Since bruceh says that the gl matrices guarantee w > 0, I don't see
any problem regarding correctness with the division in step (2). The
only modelling matrices (the "M" of the "MVP" above) that I use are
translate, scale and rotate. What could I still be doing wrong ?
Well, this discussion is helping me understand this stuff a lot
better.
Thanks again,
Andrew
More information about the Comp.sys.sgi
mailing list