🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.misc
Article #247

Help with matrix stack

#247
From: Stephen Lau
Date: Thu, 21 Jan 1993 20:54
28 lines
1683 bytes
I'm trying to use the matrix stack to construct a transformation
matrix that converts an object's coordinates to window coordinates.

I've done it manually, constructing my own matrices and converting
the coordinates, but what I really want to do is to utilize some
of the GL calls, namely perspective, rotate, translate, scale and
lookat.

I would like to call perspective() and lookat() and then somehow get
this combined transformation matrix and use it to do my own coordinate
transformations and clipping. Is this possible?

I've tried calling perspective() and lookat() and then getmatrix(), but
the resulting matrix doesn't transform it to window coordinates, only to
local world coordinates. This is part of the way, but I'm missing the final
step that then projects this to window coordinates. 

Any help would be most appreciated.

Steve

-------------------------------------------------------------------------------
Stephen Lau                 lau@ai.sri.com| 
SRI International                         | "Frosted milk with cereal and juice
333 Ravenswood Ave., Menlo Park, CA. 94025|  forms a complete breakfast!"
(415) 859-2925              (415) 326-6200|            - Ren & Stimpy     
-------------------------------------------------------------------------------
Technical Details
Message-ID: <LAU.93Jan21125414@sunset.ai.sri.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!hplabs!unix!unix.sri.com!lau

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!hplabs!unix!unix.sri.com!lau
From: lau@sunset.ai.sri.com (Stephen Lau)
Newsgroups: comp.sys.sgi.misc
Subject: Help with matrix stack
Message-ID: <LAU.93Jan21125414@sunset.ai.sri.com>
Date: 21 Jan 93 20:54:14 GMT
Sender: news@unix.SRI.COM
Distribution: comp
Organization: SRI International, Menlo Park, CA
Lines: 29