glClearColor and integer/float frambuffers

Hi there

If i interpret the spec correctly, i can set three clear-colors: one for all float buffers, one for all signed integer buffers and finally one for all unsigned integer buffers.

Is this correct?

That would mean, that when i glClear (GL_COLOR_BUFFER_BIT), ALL current color attachments will be cleared with the value corresponding to their value type. And if i wanted to clear different integer attachments with different values, i would somehow need to bind and clear them one after another, right?

I just want to make sure i get these details right, before i write an abstraction around them.

Thanks,
Jan.

There is also glClearBuffer{if ui}v(enum buffer, int drawbuffer, const T* value) functions for clearing individual buffers. See page 189 of gl3.1 spec.

No-- there is only a single clear color (see the state table). But there are three different ways to set it.