clear a GL_R32UI renderbuffer with an int

Hi,
I have trouble finding anything on how to clear an integer renderbuffer.
glClear(GL_COLOR_BUFFER_BIT) does set it to zero, but how can I set it to a different value?
Thanks,
Soren

Take a look at glClearBuffer.

Or glClearColorIiEXT from EXT_texture_integer.

Thanks guys,
I have had a look at glClearBuffer but am unable to find a suitable example. Also the documentation does not specify integer use outside of depth and and stencil buffers.
Did not have any luck with the extensions either so may just draw a textured quad in stead.
Thanks
Soren

Just use the following code:

unsigned int clear_value = put_here_your_clear_value;
glClearBufferuiv(GL_COLOR, 0, &clear_value);

Here GL_COLOR and 0 specifies that the first color buffer has to be cleared with the specified clear value.

That works! Thanks so much - I skipped over glClearBuffer too fast.
Thanks again!

Soren

Before you try out my previous code, sorry, but I wrote it incorrectly, because the clear value must always be a vec4 value (even though you need only the red component), so the code should be like this:

unsigned int clear_value[4] = { put_here_your_clear_value, 0, 0, 0 };
glClearBufferuiv(GL_COLOR, 0, clear_value);