Hi,
I am trying to learn OpenGL from "OpenGL SuperBible Sixth Edition". I was able to compile sb6source and example from book. But I get a bug. If I try to run program sometimes it draw point and sometimes do not draw. Point are drawn about once in 10 tries. And I can't figure out why it happens. Can someone find a bug or explain why it happens? Here are example source.

Code :
#include "sb6.h"
 
GLuint compile_shaders();
 
class App : public sb6::application
{
  void render(double currentTime)
  {
    const GLfloat color[] = { 0.8, 0.8, 0.0f, 1.0f };
    glClearBufferfv(GL_COLOR, 0, color);
 
    glUseProgram(m_program);
    glPointSize(40.0f);
    glDrawArrays(GL_POINTS, 0, 1);
  }
 
  void startup()
  {
    m_program = compile_shaders();
    glGenVertexArrays(1, &m_vao);
    glBindVertexArray(m_vao);
  }
 
  void shutdown()
  {
    glDeleteVertexArrays(1, &m_vao);
    glDeleteProgram(m_program);
  }
 
  private:
    GLuint m_program;
    GLuint m_vao;
};
 
GLuint compile_shaders()
{
  GLuint vs;
  GLuint fs;
  GLuint program;
 
  static const GLchar * vs_source[] =
  {
    "#version 430 core"
    "void main(void)"
    "{"
    "gl_Position = vec4(0.0, 0.0, 0.0, 1.0);"
    "}"
 
  };
 
  static const GLchar * fs_source[] =
  {
    "#version 430 core"
    "out vec4 color;"
    "void main(void)"
    "{"
    "color = vec4(0.0, 0.8, 1.0, 1.0);"
    "}"
  };
 
  // Create and compile vertex shader
  vs = glCreateShader(GL_VERTEX_SHADER);
  glShaderSource(vs, 1, vs_source, NULL);
  glCompileShader(vs);
 
  // Create and compile fragment shader
  fs = glCreateShader(GL_FRAGMENT_SHADER);
  glShaderSource(fs, 1, fs_source, NULL);
  glCompileShader(fs);
 
  // Create program, attach shaders to it and link it
  program = glCreateProgram();
  glAttachShader(program, vs);
  glAttachShader(program, fs);
  glLinkProgram(program);
 
  // Delete the shaders as the program has them now
  glDeleteShader(vs);
  glDeleteShader(fs);
 
  return program;
 
}
 
DECLARE_MAIN(App);