also works. so does that mean location 0 is reserved for the color output ? Is there any sentences in the GL specification that describe this topic ? many thanks!
It means that the value of whatever is copied to output location zero. For the initial state and the default framebuffer, that will be the front buffer for single buffered contexts and the back buffer for double-buffered contexts. For a FBO, it will be whatever is bound to colour attachment zero. The relationship between output locations and buffers or attachments is controlled by glDrawBuffers.
In the 4.6 specification, this is covered in chapter 9 and section 17.4.