Re: [Plib-devel] Ancient history....depth buffer queries
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-05-23 01:54:05
|
Scott McMillan wrote: > If I only had a blue book..... If you have an O2, you don't need the Blue Book - the SGI 'man' pages are the exact same thing as the corresponding Blue Book entries. > However on the 02 I don't get what > you state above. I get something slightly different: > > (0,2147482496) - not MAX_INT Yep - there is a reason for that. It's because of the way glPolygonOffset works - they need a little extra depth range beyond far-Z to allow for glPolygonOffset and accumulated roundoff error in iterating Z across a polygon. They made a mistake about that on the old VGXT machines and it could cause *MAJOR* hassles. The slightly curtailed depth range is a kludge to get around that....I *think*... :-) > If I am misunderstanding your last statement please clarify with > some math. ...if you understand what's going on - you are one step ahead of me! I just regurgitate that equation on demand. > When they want a depth buffer image, you don't have too many > choices. I was wondering if there was an extra penatly incurred > by reading floats instead of ints. I am not really sure where > to go to read up on technical aspects of the depth buffer and > read backs. Well, you can be sure the hardware is 'int' deep down inside - so it'll certainly take some extra math to convert it to float... but then you'd have to convert it to float anyway - so you might as well let OpenGL do it - just on the offchance that you might one day find a machine with a floating point Z buffer and save yourself a ton of time. I think the conversion time will be small compared to the readout time. > P.S. should we take this discussion off-line...it is straying a > bit from PLIB development? Maybe...This list isn't exactly overrun with techy stuff recently. I don't think we'll get too many complaints - and there is an off-chance that someone out there will *know* what they are talking about! -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |