title: triangle in openGL 3.1 but nothing in 3.2
body: <p>Anybody knows why this code shows a triangle in openGL 3.1 but nothing in 3.2?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/glfw.h&gt;
  
  GLuint myVBO;
  
  void onDraw() {
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
      glEnableVertexAttribArray(0);
      glBindBuffer(GL_ARRAY_BUFFER, myVBO);
      glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
      glDrawArrays(GL_TRIANGLES, 0, 3);
      glDisableVertexAttribArray(0);
      glfwSwapBuffers();
  }
  
  void loadData() {
      static const GLfloat g_vertex_buffer_data[] = {
         -1.0f, -1.0f, 0.0f,
         1.0f, -1.0f, 0.0f,
         0.0f,  1.0f, 0.0f,
      };
      glGenBuffers(1, &amp;myVBO);
      glBindBuffer(GL_ARRAY_BUFFER, myVBO);
      glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
  }
  
  void createWindow() {
      int w=800,h=600;
      if(glfwInit() != GL_TRUE){
          return;
      }
      glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
      glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
      glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2); //change to 1 to see the triangle
      //glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  
      if(!glfwOpenWindow(w,h,5,6,5,0,8,0,GLFW_WINDOW)){
          glfwTerminate();
          return;
      }
      if(glewInit() != GLEW_OK){
          return;
      }
      printf("Version: %s\n", glGetString(GL_VERSION));
      printf("Error: %d\n", glGetError());
  }
  int main() {
      createWindow();
      loadData();
      while(1){onDraw();}
      return 0;
  }
  </code></pre>
  
  <p>based on the first 2 tutorials on <a href="http://www.opengl-tutorial.org/" rel="nofollow">http://www.opengl-tutorial.org/</a>
  My output is</p>
  
  <pre><code>Version: 3.2.0 NVIDIA 295.49
  Error: 1280
  </code></pre>