Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Hide Part of an Object?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Derry, NH
    Posts
    140

    Hide Part of an Object?

    Is there any way to hide part of an Object, for example, a cylinder?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,757

    Re: Hide Part of an Object?

    In general, yes. More details would help though.

    I get the feeling this post should be in the beginner's forum too.

    [This message has been edited by DFrey (edited 04-23-2002).]

  3. #3
    Member Regular Contributor
    Join Date
    Feb 2002
    Location
    Hamburg, Germany
    Posts
    415

    Re: Hide Part of an Object?

    z-buffer ?

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Derry, NH
    Posts
    140

    Re: Hide Part of an Object?

    Sometimes, I do not want to display the whole object, so I hope I can hide part of it. For example, I draw a cyclinder by using gluCylinder Function, I want to hide the right half of this object. I feel that I get no control over the pixels of this object. That's why I made the post. Perhaps I should post it in Beginners' Forum, but I just want a quick answer. Thanks.

  5. #5
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    3,032

    Re: Hide Part of an Object?

    Look up "glClipPlane" on the internet, or in the red book.
    Knackered

  6. #6
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Philadelphia
    Posts
    332

    Re: Hide Part of an Object?

    You do have some controls on the pixels using buffers.
    Anyway, for your "specific" example, you can use the additional clip planes available in OpenGL. For example, you can look at:
    http://www.opengl.org/developers/documen...000000000000000

  7. #7
    Junior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Derry, NH
    Posts
    140

    Re: Hide Part of an Object?

    If I use clip plane, will all the objects on one side of the plane be invisible?

  8. #8
    Member Regular Contributor
    Join Date
    May 2000
    Location
    Philadelphia
    Posts
    332

    Re: Hide Part of an Object?

    Originally posted by Rong Yao:
    If I use clip plane, will all the objects on one side of the plane be invisible?
    Only between glEnable(GL_CLIP_PLANEn)
    glDisable(GL_CLIP_PLANEn) are clipped.

  9. #9
    Junior Member Newbie
    Join Date
    Feb 2002
    Posts
    18

    Re: Hide Part of an Object?

    there is another question like this. If using clipping to hide the part of a object, the plane cut will be only drawed a frame based on the object. How can I capture the pixels in the plane cut in order to fill the plane?

    Thanks

    ding

  10. #10
    Junior Member Newbie
    Join Date
    Feb 2002
    Posts
    18

    Re: Hide Part of an Object?

    In addtion, if I want to hide the part of a object,which is irregular and cannot just put on side of a plane. Who can tell me how to do?

    thanks again!

    ding

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •