| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Wednesday, December 25, 2002, at 12:41 PM, Brian Greenstone wrote:That's exactly what I've spend all day doing. I just finished it 3 minutes
ago and it works perfectly now. It's too bad that OpenGL doesn't have this
built in for a few reasons tho:
It's been a while since I looked at picking, but I don't see why you couldn't work around the min/max depth value by doing a glReadPixels on the depth buffer for the single pixel under the cursor to get the 'exact' transformed depth value. If you pass this into gluUnproject along with the screen x/y you should get pretty good results.
You will still probably get more precise results by computing the final point via ray/triangle intersection tests yourself (since the depth buffer is typically 'only' 24 bits has non-linear precision :). Dunno how much the precision matters to you, though.
| References: | |
| >Re: Picking (From: "Timothy J. Wood" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.