Re: Identifying pixels
- From: fungus <umailMY@xxxxxxxxxxxxxxx>
- Date: Wed, 26 Oct 2005 13:29:30 +0200
Athanasios Mantes wrote:
Hi all,
I have a 3d scene with various objects rendered, and I'm trying to do the following: render a small tooltip that shows the distance of the camera to the point in 3d space that corresponds to the pixel the mouse points. I know that I have to get the z buffer for the pixel, use gluUnproject etc, but my problem is this: since moving the mouse doesn't cause the scene to re-render, I can't get the z buffer value for an arbitrary pixel, without rendering the scene first, and reading the depth component pixel value for the specific pixel. Of course, rendering the scene for every mouse move is not desired (as many of you pointed out in a previous post), but I don't see another way, and reading the depth value for all pixels, is slow.
Why can't you read the depth buffer more than once (ie. without re-rendering)?
-- <\___/> / O O \ \_____/ FTB. For email, remove my socks.
In science it often happens that scientists say, 'You know that's a really good argument; my position is mistaken,' and then they actually change their minds and you never hear that old view from them again. They really do it. It doesn't happen as often as it should, because scientists are human and change is sometimes painful. But it happens every day. I cannot recall the last time something like that happened in politics or religion.
- Carl Sagan, 1987 CSICOP keynote address
.
- Follow-Ups:
- Re: Identifying pixels
- From: Dave
- Re: Identifying pixels
- References:
- Identifying pixels
- From: Athanasios Mantes
- Identifying pixels
- Prev by Date: Re: Newbie: Bitmap font on a white background
- Next by Date: Re: display lists - C#
- Previous by thread: Identifying pixels
- Next by thread: Re: Identifying pixels
- Index(es):
Relevant Pages
|