Opengl different line types sample

Contributor
Submitted by techrev on Sun, 07/09/2017 - 10:03
Forums

works with our master prgm - engrv simu

 

void jijscene()
{
 GLfloat y;      // Storage for varying y coordinate
  GLint factor = 1;    // Stippling factor
  GLushort pattern = 0x5555;  // Stipple pattern

  glEnable(GL_LINE_STIPPLE);

  for(y = -90.0f; y < 90.0f; y += 20.0f)
    {
    glLineStipple(factor,pattern);

    glBegin(GL_LINES);
      glVertex2f(-80.0f, y);
      glVertex2f(80.0f, y);
    glEnd();

    factor++;
    }

}