Hi all,

When drawing a line over a mesh, OpenGL allows to use glPolygonOffset to make sure the line is draw over the faces of the mesh.

Now when drawing a (say NURBS) surface, the parameter space of the surface is sampled to create a mesh representing the surface. Now if I want to draw an isoline, over the surface, the isoline is sampled at a fixed parameter u or v. Now it turns out that the lines of the isoline does not go through the exact triangles of the surface mesh (because of the sampling described above). Hence glPolygonOffset will not work in this case.

I have read about disabling depth, or using a bigger glPolygonOffset, or using textures, but these are all hacks, no? On the opposite, CAD and CG softwares do this very cleanly, but I have no idea how.

Then what is the right way to draw an line on a curved surface?

Kind regards,