[osg-users] FBO PBO readPixels

2013-08-08 Thread Filip Arlet
Hi, Can you give me an osg example of rendering to frame buffer object with camera postdraw callback and glReadPixels(); ? I want to read from FBO with PBO and double buffering, but glReadPixels(GL_COLOR_ATTACHMENT0); returns invalid operation even when I attach texture to camera. Can it be

[osg-users] Intersection visitor and osg::Viewport

2013-08-08 Thread Aurelien Albert
Hi, I'm experiencing some problems to get correct intersections in following situation : I have a group in my scene graph which have a Viewport StateAttribute to modify its rendering frame on screen. All is works well for render, but intersector seems lost wih nodes below my group. Is there

Re: [osg-users] Intersection visitor and osg::Viewport

2013-08-08 Thread Aurelien Albert
Hi, I've tried the following and it seems to solve my problem : Code: void IntersectionVisitor::apply(osg::Group group) { if (!enter(group)) return; osg::Viewport* pViewport = NULL; if (group.getStateSet() != NULL) { pViewport =

Re: [osg-users] Occlusion Query Node Error

2013-08-08 Thread Paul Martz
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

Re: [osg-users] Occlusion Query Node Error

2013-08-08 Thread Zach Basanese
Thanks for the help Paul. When I look at OQN, in its draw implementation it will create the RetrieveQueryCallbacks (RQC) and ClearQueryCallbacks (CQC) if no post draw callbacks exist already. However, we already have custom pre and post draw callbacks. Therefore, the required RQC and CQC don't