dotted lines - gl line stipple

    Apr 11 2006 | 2:25 pm
    can anyone explain to me how I can use gl line stipple to draw a dotted line?
    below is what i have so far but it gives me an error:
    ob3d_draw_end popmatrix: GL Error: Invalid operation

    • Apr 11 2006 | 8:37 pm
      Note that you can't give arbitrary gl calls between glbegin and glend. It is a very small subset of calls which are valid within glbegin/end, mostly restricted to vertex attributes (position, texture, color, normals, fog coordinate, etc). other opengl calls such as any glenable/disable calls must happen before the glbegin call. Changing this, your example seems to work as expected for me.
      See the OpenGL Red Book (p.46 in my edition) for more information on glBegin()/glEnd() restrictions.
    • Apr 11 2006 | 9:28 pm
      thanks very much joshua, that worked.