title: GLFW program don't draw triangle
body: <p>My OpenGL program is broken and i have no idea why.</p>
  
  <p>There is my code bellow.</p>
  
  <p>And i use Mac OS X 10.9. 
  This is minimal program for reproducing bug</p>
  
  <p>Fragment Shader </p>
  
  <pre><code>#version 410 core
  out vec4 FragColor;
  void main()
  {
      FragColor = vec4(1.0f, 1.0f, 1.0f, 1.0f);    
  }
  </code></pre>
  
  <p>Vertex Shader</p>
  
  <pre><code>#version 410 core 
  layout(location=0) in vec2 position;
  void main()
  {
      gl_Position = vec4(position, 0.0f, 1.0f);
  }
  </code></pre>
  
  <p>Draw function</p>
  
  <pre><code>void draw()
  {
    glUseProgram(program);
  
    glBindVertexArray(VAO);
    glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, 0);
    glBindVertexArray(0);
  }
  </code></pre>
  
  <p>Init function</p>
  
  <pre><code>void initData()
  {
    unsigned int indexes[] =
    {
     0,1,2
    };
  
    float data[] =
    {
        0.0f,0.8f,
       -0.8f, 0.0f,
        0.8f,0.0f
    };
  
    glGenVertexArrays(1, &amp;VAO);
    glBindVertexArray(VAO);
  
    glGenBuffers(1, &amp;vertex_buffer);
    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);
    glBufferData(GL_ARRAY_BUFFER, sizeof(data), data,GL_STATIC_DRAW);
  
    glGenBuffers(1, &amp;index_buffer);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer);
    glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indexes), indexes, GL_STATIC_DRAW);
  
    glEnableVertexAttribArray(0);
  
    glVertexAttribPointer(0,2,GL_FLOAT, GL_FALSE,0,0);
    glBindVertexArray(0);
  }
  </code></pre>
  
  <p><strong>UPD</strong></p>
  
  <p><em>Program below takes this output</em></p>
  
  <pre><code>GL_VERSION                  : 4.1 INTEL-8.18.29
  GL_VENDOR                   : Intel Inc.
  GL_RENDERER                 : Intel HD Graphics 5000 OpenGL Engine
  GL_SHADING_LANGUAGE_VERSION : 4.10 
  </code></pre>
  
  <p><strong>UPD 2</strong></p>
  
  <p><em>Solved, found bug in shaders compilation function</em></p>