To temporarily avoid sorting algorithm, I've loaded only a big cube and a small sphere behind it. Even exchanging loading/rendering sort (from first to last, or from last to first) both objects are always visible and pass occlusion_query with fragment_count > 0 (370.000 for cube and 42 for sphere).
If the sphere goes outside camera (but still INSIDE for frustum check, due to sphere-radius bigger than real objects), or the object becames too small to be rendered in 1 fragment, the query_result goes to Zero.
So the occlusion_query seems to work....a bit
Update 1: I've linked a different, and very simple, Vertex+Fragment Shader to just execute (in Vertex) "gl_Position = PVM * vertex" and (in Fragment) "out fragColor= vec4(1.0, 1.0, 1.0, 1.0)". No changes.
Update 2: I've tested a full-object-rendering during occlusion_query (not just boudingBoxes) without significant changes.
Last edited by tdname; 10-30-2012 at 09:13 AM.