Quote Originally Posted by saman_artorious View Post
Then how could I monitor a reliable one?
That's a very good question. Probably using some dedicated instrumentation tool.

Vertices are created at initialization once and then only used. All render functions inside paint do the following:
Qt Code:
  1. void PlanPositionIndicator::render(QGLShaderProgram* shaderProgram)
  2. {
  3. // qDebug() << vertices.size();
  4.  
  5. shaderProgram->setAttributeArray("vertex", vertices.constData());
  6. shaderProgram->enableAttributeArray("vertex");
  7. shaderProgram->setAttributeArray("color", GL_FLOAT,colors,1);
  8. // shaderProgram->setAttributeArray("color", GL_FLOAT,colors.data(),1);
  9. shaderProgram->enableAttributeArray("color");
  10.  
  11. glEnable (GL_BLEND);
  12. glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  13.  
  14. glDrawArrays(GL_TRIANGLES, 0, vertices.size());
  15. }
To copy to clipboard, switch view to plain text mode 
What is "vertices"? Is it a vertex buffer? Did you tell OpenGL that these values are static?