OcclusionQueryNode (OQN) has changed significantly since I contributed to
this effort, so I can only provide general advice.

OQN issues occlusion queries to OpenGL, and to avoid stalling the pipe,
waits until the Camera's post-draw callback to retrieve the query results.
Then it uses those results to determine what is visible in the next frame.
RetrieveQueriesCallback is the post-draw callback that is used to retrieve
the queries. For some reason, your Camera doesn't have such a callback
attached.

I'd suggest searching the OSG source to see where RetrieveQueriesCallback
is attached to the Camera. I believe OQN was originally written to perform
this task automatically.

It is also possible that you have attached some other Camera post-draw
callback. If so, you would need to take steps to ensure that both callbacks
are being executed.


On Wed, Aug 7, 2013 at 4:07 PM, Zach Basanese <[email protected]>wrote:

> Hello and thank you for any help in advance,
>
> I am working with some code that a coworker had created, but is
> unavailable at the moment. It deals with Occlusion Query Nodes.
> When we were still in OSG version 2.8, my coworker had grabbed a lot of
> the methods from the 3.0 version's OcclusionQueryNode.cpp and put them in
> our code so that we could use them for our sun. However, now that we have
> transitioned to 3.0, the code that was brought in isn't being used anymore,
> defaulting to OSG's code.
> The issue is, whenever our sun is on screen, we are getting the following
> error now: "osgOQ: QG: Invalid RQCB."
> This apparenlty happens becaues of this area of code:
>
> Code:
>
> RetrieveQueriesCallback* rqcb = dynamic_cast<
> RetrieveQueriesCallback* >( cam->getPostDrawCallback() );
> if (!rqcb)
> {
> OSG_FATAL << "osgOQ: QG: Invalid RQCB." << std::endl;
> return;
> }
>
>
>
> I think it might be that we aren't setting up the nodes correctly, but I
> haven't been able to find any examples or documentation related to this
> error or how to properly set up occlusion query nodes in OSG.
> Any help is appreciated, please let me know if you have any questions
> regarding my question.
>
> Zach[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=55804#55804
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Paul Martz
Skew Matrix Software LLC
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to