Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: view problem

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    New Zealand
    Posts
    112

    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).]

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    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

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    New Zealand
    Posts
    112

    Re: view problem

    how do ya get the depth value from the depth buffer?

  4. #4
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    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
  •