How to keep dashed lines from "dancing" in OpenGl? <p>I'm drawing some lines in OpenGL (from C) using code like this:</p> <pre><code>glLineStipple(6, 0xEEEE); glEnable(GL_LINE_STIPPLE); glBegin(GL_LINE_STRIP); glVertex2f(x, y); ... </code></pre> <p>It works great if everything is still. However, my problem is that as soon as I zoom in or out the line starts shimmering. I mean that the location of the dashes in the line move around. It looks very sloppy.</p> <p>Is there someway to anchor how the line is dashed in model space? I think my issue is that <code>glLineStipple()</code> look at the number of pixels drawn, but I'd like it to look at the length in model space instead.</p>