Re: [osg-users] osgViewer help needed
Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer help needed
Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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.or g ___ 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
Re: [osg-users] osgViewer help needed
Robert, That will be difficult to achieve. What if each view had a unique root node, and each root node had an update callback? Would all of the update callbacks be triggered during the update traversal? This means that if I want Selection Geometry to be unique per view, that I would have to give each view a unique group to attach the selection geometry to. Am I understanding this? As far as the cull callbacks go, what are you saying is legal to perform? What is multi-buffering of internal structures? What does it mean to select from the multi-buffer? Thanks for your advice, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 27, 2008 12:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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. or g ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer help needed
Hi John, I have pointed you in the right direction. You can do what you need to do using node masks and multiple node/buffers. Robert. On Fri, Jun 27, 2008 at 7:27 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, That will be difficult to achieve. What if each view had a unique root node, and each root node had an update callback? Would all of the update callbacks be triggered during the update traversal? This means that if I want Selection Geometry to be unique per view, that I would have to give each view a unique group to attach the selection geometry to. Am I understanding this? As far as the cull callbacks go, what are you saying is legal to perform? What is multi-buffering of internal structures? What does it mean to select from the multi-buffer? Thanks for your advice, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 27, 2008 12:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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. or g ___ 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.or g ___ osg-users mailing list osg-users
Re: [osg-users] osgViewer help needed
Node Masks is the thing to look at using -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Friday, June 27, 2008 2:28 PM To: [EMAIL PROTECTED] Subject: Re: [osg-users] osgViewer help needed Robert, That will be difficult to achieve. What if each view had a unique root node, and each root node had an update callback? Would all of the update callbacks be triggered during the update traversal? This means that if I want Selection Geometry to be unique per view, that I would have to give each view a unique group to attach the selection geometry to. Am I understanding this? As far as the cull callbacks go, what are you saying is legal to perform? What is multi-buffering of internal structures? What does it mean to select from the multi-buffer? Thanks for your advice, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 27, 2008 12:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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. or g ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http
Re: [osg-users] osgViewer help needed
Gordon, When do you change the node masks? Also, node masks are limited by the number of bits they contain. In a simulation, we could have 1000 entities. Some are not selected, selected, highlighted etc in each view. We'd run out of bits pretty quickly. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: Friday, June 27, 2008 2:39 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] osgViewer help needed Node Masks is the thing to look at using -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Friday, June 27, 2008 2:28 PM To: [EMAIL PROTECTED] Subject: Re: [osg-users] osgViewer help needed Robert, That will be difficult to achieve. What if each view had a unique root node, and each root node had an update callback? Would all of the update callbacks be triggered during the update traversal? This means that if I want Selection Geometry to be unique per view, that I would have to give each view a unique group to attach the selection geometry to. Am I understanding this? As far as the cull callbacks go, what are you saying is legal to perform? What is multi-buffering of internal structures? What does it mean to select from the multi-buffer? Thanks for your advice, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 27, 2008 12:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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. or g
Re: [osg-users] osgViewer help needed
On Fri, Jun 27, 2008 at 7:41 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Gordon, When do you change the node masks? Also, node masks are limited by the number of bits they contain. In a simulation, we could have 1000 entities. Some are not selected, selected, highlighted etc in each view. We'd run out of bits pretty quickly. You don't have 1000's of views do you? Please have a look at the osgstereimage example to see how camera cull masks and node masks can be used together. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer help needed
Well you could do it many ways, it seems like you have 2 main states pickable/not pickable then you have your views, you would not have a seperate mask for every objects(If you want unique for every then you could encode an ID in the nodes/objects top node and store it in its name) So you have for 2 views Camera mask stays at 0xff Then each views would have a mask for the selection to say what is pickable in that view, so this would give you 15 views 0xfff (thedefault) coulc be say the not selectable mask in any view Selectable groups and nodevistors would then use something like 0x0001 the node would selectable in view 0 0x0010 the node would selectable in view 1 0x0100 the node would selectable in view 2 Etc etc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Friday, June 27, 2008 2:42 PM To: [EMAIL PROTECTED] Subject: Re: [osg-users] osgViewer help needed Gordon, When do you change the node masks? Also, node masks are limited by the number of bits they contain. In a simulation, we could have 1000 entities. Some are not selected, selected, highlighted etc in each view. We'd run out of bits pretty quickly. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: Friday, June 27, 2008 2:39 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] osgViewer help needed Node Masks is the thing to look at using -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Friday, June 27, 2008 2:28 PM To: [EMAIL PROTECTED] Subject: Re: [osg-users] osgViewer help needed Robert, That will be difficult to achieve. What if each view had a unique root node, and each root node had an update callback? Would all of the update callbacks be triggered during the update traversal? This means that if I want Selection Geometry to be unique per view, that I would have to give each view a unique group to attach the selection geometry to. Am I understanding this? As far as the cull callbacks go, what are you saying is legal to perform? What is multi-buffering of internal structures? What does it mean to select from the multi-buffer? Thanks for your advice, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 27, 2008 12:53 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgViewer help needed Hi John, It's sounds like you are abusing the OSG, i.e. using in ways that it's not designed to be used. Refactoring your scene graph usage slightly will probably fix the problems you have without having to fight the OSG continuously. First up some basics, the updating of the scene graph is designed to be be done wholly before the cull and draw traversals, this makes it possible to thread the scene graph without requiring complex multi-buffering that you'd find in Performer/OpenSG. You should consider updating the scene graph during cull and draw prohibited. The only exception to this is when you multi-buffer internal structures. Now given thrashing node parameters like you are doing is prohibited, so next you need to find an alternative, the hint of how to do it is in the last sentance above - you need to buffer you scene graph elements so that instead of one object that you change the state of, you have one node or one data element per view/camera. You can do this via cull callbacks that's maintain local buffer of data that is selected on the fly, or to just use separate subgraphs with the topmost node unique for each view/camera. You can set the cull masks individually for cameras, so you could use NodeMask's to select which part of the scene graph you want to use in each instance. Now if you don't want to follow this advice, we then I'm afraid I'll just stand back and stop giving you support on this topic, I really don't have time to go chasing people abusing the scene graph. Robert. On Fri, Jun 27, 2008 at 5:14 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Robert, We've created our own event processing system. We need to manage a common scene with different node masks, switch node settings, etc. The problem is that the event traversal and update traversal happens for all views before the cull/draw traversal. So if we follow your methods of processing events in the event traversal or update traversal, we end up with all views looking like the most recently created view, instead of being unique. If I change the scene graph in the camera's final draw callback, it works but OSG spits out a bunch of OpenGL errors for what I'm assuming is the current frame. Thanks for your time. Sincerely, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, June 26, 2008 6:16 AM To: OpenSceneGraph Users Subject
Re: [osg-users] osgViewer help needed
Hi John, What operation are you needing to do? Robert. On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ 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
[osg-users] osgViewer help needed
All, I need to have a callback from within osgViewer::CompositeViewer that happens just before each graphics context's renderer does cull_draw(). It can't be part of the cull traversal or the camera's pre-draw traversal, or the update traversal. Single threaded, and right before the cull traversal. Does anyone know of a way that this can be done without gutting osgViewer? Many thanks, John Argentieri ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org