I've tried many ways but I can't execute a good occlusion culling using ARB_occlusion_query extension.
- BEGIN WHILE for each object....
--- frustum culling check
--- if not in frustum, continue to next object
--- I turn off color mask
--- I render bounding box
--- check culling result with glGetQueryObjectuiv(...., &occlusion_result)
--- I turn on color mask
--- I render only visible object (visible = "occlusion_result" variable greater than 0)
- END WHILE
Using this way I have boundig_boxes drawn on screen!
How I can "render" without print to screen?
I've already tried to "render" to FBO but it seems not to work using occlusion_query...so I preferred to stay in the default "DRAW_FRAMEBUFFER" which give me some fragment_count greater than zero.
Screenshot (UP: without occlusion_query):