Results 1 to 3 of 3

Thread: How to hide the backside of the GL_LINE

  1. #1

    How to hide the backside of the GL_LINE

    I am drawing one surface on the current scene. Then on the suface, I draw a line with normal the same as the surface but different color. Then I rotate the two targets at the same time. I used

    So when the surface is rotating, it only shows me the front face. However, the line is still there when it rotated to the far side with a black line. I am wondering how to hide this line when it is rotating away with its back side. I think the depth buffer will handle this if there is something infront of the line. But it is not working in my case.
    Thank you very much,

  2. #2
    Senior Member
    Join Date
    May 2010
    Toronto, Canada

    Re: How to hide the backside of the GL_LINE

    GL lines don't have front and back faces. You would need to either cull the lines yourself in the CPU or tesselate them (i.e. transform them into polygons).
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3

    Re: How to hide the backside of the GL_LINE

    Thanks. That is what I did later on to solve this problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean