Re: [osg-users] OverlayNode and Uniform Update Callback
Hi osg-users, It seems that the overlay::OverlayData::_camera prevents attached subgraph callback to be called. In future version, is it possible to attach an update callback to the overlay::OverlayData::_camera node, by creating a new function like : void setOverlayCameraCallback(osg::NodeCallback* nc) { _overlayCameraCallback = nc; } And then attach this one when creating OverlayData::_camera. This will allow to pass a custom update callback, to update subgraph. Kind regards, 2011/2/22 Alexandre Amalric alex.pix...@gmail.com Hi Sergey, My overlay node isn't under a camera node, but is it possible that the overlay projection mecanism is using a camera with subgraph attached to it and so the update traversal doesn't reach the subgraph ?? Best regards, 2011/2/21 Sergey Polischuk pol...@yandex.ru Hi, Alexandre. If your overlay subgraph is under osg camera, then update traversals dont reach there, they stop at camera node. You can try to add this uniform to stateset of some node before camera in scene graph, so it will be updated and shouldn't break anything. Cheers, Sergey. 21.02.2011, 17:57, Alexandre Amalric alex.pix...@gmail.com: Hi osg-users, I recently tried to attach a fragment shader to a node and set it as an overlay subgraph. My shader is using a uniform that I want to update, so I attached a derived osg::Uniform::Callback to it but this one is never called. When the same node is added to the scenegraph and not only as an overlay subgraph the callback is called. Is it possible that the updatevisitor is never called on models wich belong to an overlay subgraph ?? For info, I'm using osg 2.8.3. Kind regards, -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OverlayNode and Uniform Update Callback
Hi Sergey, My overlay node isn't under a camera node, but is it possible that the overlay projection mecanism is using a camera with subgraph attached to it and so the update traversal doesn't reach the subgraph ?? Best regards, 2011/2/21 Sergey Polischuk pol...@yandex.ru Hi, Alexandre. If your overlay subgraph is under osg camera, then update traversals dont reach there, they stop at camera node. You can try to add this uniform to stateset of some node before camera in scene graph, so it will be updated and shouldn't break anything. Cheers, Sergey. 21.02.2011, 17:57, Alexandre Amalric alex.pix...@gmail.com: Hi osg-users, I recently tried to attach a fragment shader to a node and set it as an overlay subgraph. My shader is using a uniform that I want to update, so I attached a derived osg::Uniform::Callback to it but this one is never called. When the same node is added to the scenegraph and not only as an overlay subgraph the callback is called. Is it possible that the updatevisitor is never called on models wich belong to an overlay subgraph ?? For info, I'm using osg 2.8.3. Kind regards, -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OverlayNode and Uniform Update Callback
Hi, Alexandre.If your overlay subgraph is under osg camera, then update traversals dont reach there, they stop at camera node.You can try to add this uniform to stateset of some node before camera in scene graph, so it will be updated and shouldn't break anything.Cheers, Sergey.21.02.2011, 17:57, "Alexandre Amalric" alex.pix...@gmail.com:Hi osg-users,I recently tried to attach a fragment shader to a node and set it as an overlay subgraph.My shader is using a uniform that I want to update, so I attached a derived osg::Uniform::Callback to it but this one is never called. When the same node is added to the scenegraph and not only as an overlay subgraph the callback is called.Is it possible that the updatevisitor is never called on models wich belong to an overlay subgraph ?? For info, I'm using osg 2.8.3.Kind regards,-- Alexandre AMALRIC Ingnieur RD===PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org