title: GLES 2.0 draws GL_POINTS as squares on Android?
body: <p>Below is a simple QT program using a VBO to draw 6 points.  The points appear as squares on Android and single pixels on the desktop.  When I change <code>gl_PointSize</code> in the vertex shader, the squares change to the appropriate size on Android but remain single pixels on the desktop.</p>
  
  <p>example.pro</p>
  
  <pre><code>QT += core gui widgets opengl
  
  TARGET = example
  TEMPLATE = app
  
  SOURCES = main.cpp
  HEADERS = main.h
  </code></pre>
  
  <p>main.h</p>
  
  <pre><code>#include &lt;QGLWidget&gt;
  #include &lt;QGLFunctions&gt;
  #include &lt;QGLShader&gt;
  
  class glview : public QGLWidget, protected QGLFunctions
  {
      Q_OBJECT
  
  public:
      explicit glview(QWidget *parent = 0);
  
  protected:
      void initializeGL();
      void resizeGL(int w, int h);
      void paintGL();
  
  private:
      quint32 vbo_id[1];
      QGLShaderProgram *program;
  };
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include "main.h"
  
  struct vrtx {
      GLfloat x;
      GLfloat y;
      GLfloat z;
      GLfloat r;
      GLfloat g;
      GLfloat b;
  }__attribute__((packed)) geomrtry[] = {
      //   x, y, z   r, g, b
      {1, 1, 0, 1, 0, 0},
      {1.5, 2, 0, 0, 1, 0},
      {2, 1, 0, 0, 0, 1},
      {3, 1, 0, 1, 0, 1},
      {3.5, 2, 0, 1, 1, 0},
      {4, 1, 0, 0, 1, 1},
  };
  
  int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
      glview widget;
      widget.show();
      return app.exec();
  }
  
  glview::glview(QWidget *parent) : QGLWidget(parent)
  {
  
  }
  
  void glview::initializeGL()
  {
      initializeGLFunctions();
      qglClearColor(Qt::white);
  
      QGLShader *vshader = new QGLShader(QGLShader::Vertex, this);
      const char *vsrc =
          "attribute highp vec4 vertex;\n"
          "attribute mediump vec4 colour;\n"
          "varying mediump vec4 f_colour;\n"
          "uniform mediump mat4 matrix;\n"
          "void main(void)\n"
          "{\n"
          "    gl_Position = matrix * vertex;\n"
          "    f_colour = colour;\n"
          "    gl_PointSize = 12.0;\n"
          "}\n";
      vshader-&gt;compileSourceCode(vsrc);
  
      QGLShader *fshader = new QGLShader(QGLShader::Fragment, this);
      const char *fsrc =
          "varying mediump vec4 f_colour;\n"
          "void main(void)\n"
          "{\n"
          "    gl_FragColor = f_colour;\n"
          "}\n";
      fshader-&gt;compileSourceCode(fsrc);
  
      program = new QGLShaderProgram(this);
      program-&gt;addShader(vshader);
      program-&gt;addShader(fshader);
      program-&gt;link();
  
      glGenBuffers(1, vbo_id);
      glBindBuffer(GL_ARRAY_BUFFER, vbo_id[0]);
      glBufferData(GL_ARRAY_BUFFER, sizeof(geomrtry), geomrtry, GL_STATIC_DRAW);
  
      glEnable(GL_DEPTH_TEST);
  }
  
  void glview::resizeGL(int w, int h)
  {
      glViewport(0, 0, w, h);
  }
  
  void glview::paintGL()
  {
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  
      QMatrix4x4 matrix;
      matrix.ortho(0, 5, 0, 3, -1, 1);
  
      program-&gt;bind();
      program-&gt;setUniformValue("matrix", matrix);
  
      glBindBuffer(GL_ARRAY_BUFFER, vbo_id[0]);
      int vertexLocation = program-&gt;attributeLocation("vertex");
      program-&gt;enableAttributeArray(vertexLocation);
      glVertexAttribPointer(vertexLocation, 3, GL_FLOAT, GL_FALSE, sizeof(struct vrtx), 0);
  
      int colourLocation = program-&gt;attributeLocation("colour");
      program-&gt;enableAttributeArray(colourLocation);
      glVertexAttribPointer(colourLocation, 3, GL_FLOAT, GL_FALSE, sizeof(struct vrtx), ((char*)NULL + 12));
  
      //glDrawArrays(GL_TRIANGLES, 0, sizeof(geomrtry) / sizeof(struct vrtx));
      glDrawArrays(GL_POINTS, 0, sizeof(geomrtry) / sizeof(struct vrtx));
  
      glFlush();
  }
  </code></pre>