Hi,
I need a solution to render lines (GL_LINES) on top of some object (VBO) in my scene.
I have some object in the scene and inside some of them I create lines (like a line inside a cylinder or a bone inside a character arm). By default, the lines are not visibles because they are inside the object. My problem is I need the line to appear on top of the object they are in but not on top of other objects.
The solutions I tried was:
- make the object semi-transparent so we can see inside and the line appear (if they are draw in the right order) but I dont like that the object become transparent.
- using a custom shader to move the line closer to the camera (but the lines could appear on top of other objects if this offset is constant and too high)
-projecting the line onto the object based on the camera position (not very efficient and the projection have to be redone each time the camera move (could be problematic with hundred of lines that needs to be projected onto thousands of polygons) - asking on the forum to have other ideas…
thank you for reading this.
Have a good day.