title: The GL_LINE_STIPPLE does not work in ubuntu
body: <p>I am learning OpenGL these days, and I tried to compile the example code on the book(OpenGL SuperBible)</p>
  
  <p>The code likes this: first use <code>glEnable(GL_LINE_STIPPLE)</code> to open the <code>GL_LINE_STIPPLE</code>, and then <code>glLineStipple(2, (GLushort)0x00ff)</code>, last I draw some lines, but when executed, it just displayed the normal lines.  (in Ubuntu)</p>
  
  <p>However, I compiled the same code in windows, it worked!!</p>
  
  <p>Why? Are there any different details between Windows and Linux?</p>
  
  <pre><code>#include &lt;QtGui&gt;
  #include "GLWidget.h"
  GLWidget::GLWidget(QWidget *parent)
      : QGLWidget(parent)
  {
      setFormat(QGLFormat(QGL::DoubleBuffer));
  }
  GLWidget::~GLWidget()
  {
  }
  void GLWidget::initializeGL()
  {
      glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
      glEnable(GL_LINE_STIPPLE);
  }
  void GLWidget::resizeGL(int w, int h)
  {
      if(h == 0)
          h = 1;
      glViewport(0, 0, w, h);
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glOrtho(-100, 100, -100, 100, -1, +1);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
  }
  void GLWidget::paintGL()
  {
      glClear(GL_COLOR_BUFFER_BIT);
      drawLine();
  }
  void GLWidget::drawLine()
  {
      GLint factor = 1;
      GLushort pattern = 0x00ff;
      glColor3f(1.0f, 1.0f, 1.0f);
      for(GLfloat i = -90.0f; i &lt; 90.0f; i += 20.0f)
      {
          glLineStipple(factor, pattern);
          glLineWidth(5.0);
          glBegin(GL_LINES);
              glVertex2f(-80.0f, i);
              glVertex2f(+80.0f, i);
          glEnd();
          factor++;
      }
  }
  </code></pre>