-
Junior Member
Regular Contributor
view problem
hi
if have a point say at (0,0,0) that is in view but say there is a wall in front of it and i can not see this point on the screen how do i test for this??
[This message has been edited by jono_123 (edited 11-23-2002).]
-
Junior Member
Regular Contributor
Re: view problem
Hi!
If you want to test whether your point is visible straight from your point of view just test value in depth buffer at projected XY coordinates of that point...
Use gluProject(..) for that.
Value in depth buffer equal to projected z-value from gluProject(..) means your point is visible. otherwise - not.
Hope it helps
-
Junior Member
Regular Contributor
Re: view problem
how do ya get the depth value from the depth buffer?
-
Junior Member
Regular Contributor
Re: view problem
Use glReadPixels(...) with GL_DEPTH_COMPONENT
Anyway why not to take a look at OpenGL manuals? They're very useful for beginners.
The redbook: http://ask.ii.uib.no/ebt-bin/nph-dwe...per/OpenGL_PG/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules