"Backface culling" GL_LINES
I have a dynamically generated "grid" (more of a lattice, if anything) with variable distances between lines that I'm drawing via VBO and GL_LINES. All the lines are in the same plane, and they are offset somewhat from the modelview's center of rotation (which appears in the center of the screen).
I'm allowing the user to rotate the modelview freely, and I have a perspective projection matrix in place.
Is there any way I can piggyback OpenGL's backface culling and/or matrix system to hide one side of this grid? I'm currently using a huge kluge: using gluUnProject to convert a vector that's perpendicular to the screen and taking the dot product of the resultant vector and the normal vector of the grid. It doesn't really work as well as I would have hoped, because of the perspective projection.
I've considered a large quad with a texture or drawing individual lines with polys, but these approaches don't preserve the thickness of the lines as they are rotated. I think it might be possible with a custom shader and some linear interpolation, but I'm not sure.
Any ideas? Thanks.