Hi I would like to use atomic counter to increment it each time a fragment is write at x,y position, an write the color of this fragment in gl_FragData[n] where n is the current counter’s value.
So then I just have to sort all fragments and using blending in another fragment shader.
It tells me that the extension is supported
if (GL_ARB_shader_atomic_counters) std::cout<<"atomic counters supported"<<std::endl;
But when I try to compile the shader source code, I get an error at this line
Syntax error : failed to, unexpecting NEW identifier, expecting $end.
I know I have to use layout qualifier with binding and offset but it tells me that bindig is not a recognized layout qualifier.
So my question is how to use GL_ARB_shader_atomic_counter extension with an opengl 3.0 version ?