title: set readbuffer to an FBO color attachment fails with invalid enum error
body: <p>According to the <a href="http://www.opengl.org/sdk/docs/man4/xhtml/glReadBuffer.xml" rel="nofollow">OpenGL documentation</a> I should be able to set the source for pixel reading to any of <code>GL_COLOR_ATTACHMENTi</code>. However, when I try this, <code>glGetError</code> gives me a <code>GL_INVALID_ENUM</code> error. A subsequent <code>glReadPixels</code> simply reads the back buffer.</p>
  
  <p>The version reported by <code>glGetString(GL_VERSION)</code> is <code>4.2.11627 Core Profile Forward-Compatible Context</code>. I am running on linux and have the fglrx ati drivers installed (version 8.96.7-120312a-135598C-ATI).</p>
  
  <p>I checked that my FBO is bound and complete. I also verified the <code>glGetError</code> was not set by a previous call.</p>
  
  <p>It fails already on this (I would expect an error here, but rather <code>INVALID_OPERATION</code> than <code>INVALID_ENUM</code>):</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Window.h" // My own class based on sfml, but I am sure context creation works fine
  #include &lt;glload/gll.hpp&gt;
  #include &lt;glload/gl_core.hpp&gt;
  
  int main()
  {
      const unsigned int screenW = 1280, screenH = 720;
      Window w(screenW, screenH, 32, false);
      if (glload::LoadFunctions() == glload::LS_LOAD_FAILED)
      {
          std::cerr &lt;&lt; "glload failed to load" &lt;&lt; std::endl;
          return -1;
      }
      gl::ReadBuffer(gl::GL_COLOR_ATTACHMENT0);
      if( gl::GetError() == gl::GL_INVALID_ENUM)
      {
          std::cerr &lt;&lt; "Invalid enum error" &lt;&lt; std::endl;
          return -1;
      }
      return 0;
  }
  </code></pre>
  
  <p>Is there another reason this call could trigger <code>INVALID_ENUM</code> or is it more likely that the OpenGL implementation I am using is bugged?</p>