I'm looking an easy and reliable way to know if vertices hits the final framebuffer.
I'm not looking for the exact count, but if something actually hits the buffer. I'm trying to debug a shadow map. All my tools told me I'm drawing something, but on the final result, I don't see anything, even if I convert all in a regular framebuffer. So I want to know from the API "I'm putting a vertex on the buffer right now" to be sure and to don't waste time on a faulty framebuffer.
The tool to use is, like genpfault said it, GL_ANY_SAMPLES_PASSED with the query mechanism. glGenQueries() to create the query in question, glQueryBegin() and glQueryEnd() around the code that actually draw something and glGetQueryObjectxxx() to know if something is drawn. You can use also GL_SAMPLES_PASSED to know how many fragments has been displayed.
Really what I needed.