Angus Dorbie (dorbie++at++sgi.com)
Tue, 09 Jun 1998 13:11:16 -0700
You have the right idea, note if a point is outside the frustum it will
not
lie between -1 and 1 and should be clipped.
Also before projection you should eliminate points in eye space which
are
beyond a y threshold (they are behind eye or near clip).
There may be a 90 degree rotation about x to bring performer y into
alignment with gl projection -z, this is probably what you are missing
but that depends on exactly what's in the GLFrustumMatrix projection
returned by the pfFrustum.
You are definitely on the right track.
The other thing you could do ofcourse is to just divide eye x & y by
screen z and then scale yourself. You have to do the scale anyway for
your viewport so you may as well build in the FOV scale and use a
normalized projection for speed with the added bonus that you know
you are in Performer channel eye space. It's your choice.
Cheers,Angus.
-- "Only the mediocre are always at their best." -- Jean GiraudouxFor advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:31 PDT