Jeremy

I am not sure exactly how to do this in OSG now, but I did something like
this 4-5 years ago in OSG 0.9x.  I used the ARB_occlusion_query extention
http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt.  I
placed nodes in different renderbins added cull and draw callbacks and
queried the number of pixels rendered using the extention.  You have the
render the scene in the proper order or else you could query the number of
pixels rendered only to have some of them being overdrawn later on.  Back
then OSG did not have methods to perform the occlusion query.  It does now,
but I don't know if it will let you get the number of pixels drawn.

Hope this helps, if you need any more information feel free to ask.

Judd

On Tue, Jun 30, 2009 at 7:35 PM, Jeremy Warren <[email protected]> wrote:

>  I have a simple scene. Colored background and an object, say a box. I want
> to figure out how many pixels the box is taking up in the scene. It seems
> like a simple request, but haven't come up with any solution. Any takers?
>
> Thanks in advance
> --Jeremy
>
> ------------------------------
> Windows Liveā„¢: Keep your life in sync. Check it 
> out.<http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to