Regarding drawBuffer in glClearBufferiv
I am rendering geometry on non default FBO and applying it as integer texture to the geometry rendered on default FBO. To clear a color on non default FBO, i am using glClearBufferiv() call. I am not getting what is drawBuffer (2nd argument) in my case. I tried with 0, but its not working. it does not clear the color.
glClearBufferiv(GL_COLOR, 0, cl);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
My frag shader:
out ivec4 fragColor;
fragColor = ivec4(0,32767,0,32767);
With this, it renders green geometry but the outside color is black.