Re: [osg-users] Deep cloning an active root scene node

2019-02-28 Thread Robert Osfield
Hi Rob,

The OSG is design to allow you to rendering multiple views at once,
there is no need to clone the scene graph, you simply add another View
to a CompositeView to add the extra rendering.  You can toggle
optional View's on/off as you need them.

Robert.

On Thu, 28 Feb 2019 at 17:51, Robert Lockyer
 wrote:
>
> Hi all, my name is Rob.
>
> I'm currently writing a plugin for an OSG based application. I effectively 
> want to create a snapshot of the application's scene graph state and pass it 
> to another thread where I can render to a texture, while the main rendering 
> thread continues with minimal interruption.
>
> I'd like to do this because blocking the main thread with a 
> osgViewer::Viewer::frame() call causes the application to lock up and 
> prevents me from displaying a progress dialog. The scene I render takes a 
> long time because I render many camera views to a single texture.
>
> I'm currently trying to do this:
>
> osg::Node* sceneCopy = 
> dynamic_cast(sceneData_->clone(osg::CopyOp::DEEP_COPY_ALL));
>
> Then passing this to another thread where I run:
>
> viewer_ = new osgViewer::Viewer();
> viewer_->setSceneData(sceneCopy);
>
> However the behavior seems inconsistent. It either dies on a null reference 
> inside osgEarth somewhere or it renders an empty scene. I don't think I fully 
> understand the threading model of OSG, I've read a bit here and there, but I 
> think there's a lot I'm still missing.
>
> Is there a safe way to copy the scene data and use it to run an isolated 
> viewer like this in parallel? Is it even safe to run two viewers in parallel 
> like this at all?
>
> Cheers,
> Rob
>
> This email and any attachments are confidential and may be privileged. Any 
> unauthorized use, disclosure, copying or distribution of the information 
> received is prohibited. If you are not the intended recipient please contact 
> the sender immediately by return email confirming that you have and will 
> delete all communications related to the email and any attachments sent to 
> you in error.
> ___
> 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] show mouse cursor in embedded osg

2019-02-28 Thread Robert Osfield
On Thu, 28 Feb 2019 at 17:32, Sebastian Schmidt  wrote:
> How can i show the default osg mouse cursor in a embedded opengl context 
> (GraphicsWindowEmbedded) ?
> i tried embeddedWindow->useCursor(true), but i didnt work.

GraphicsWindowEmbedded is essentially a non op facade that makes it
possible to use the osgViewer with application provided windowing, so
the OSG itself has no direct control over the windowing or graphics
context, it's entirely up to your application.  This means it's
entirely your responsibility to implement cursor management.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Deep cloning an active root scene node

2019-02-28 Thread Robert Lockyer
Hi all, my name is Rob.

I'm currently writing a plugin for an OSG based application. I effectively
want to create a snapshot of the application's scene graph state and pass
it to another thread where I can render to a texture, while the main
rendering thread continues with minimal interruption.

I'd like to do this because blocking the main thread with a
osgViewer::Viewer::frame() call causes the application to lock up and
prevents me from displaying a progress dialog. The scene I render takes a
long time because I render many camera views to a single texture.

I'm currently trying to do this:

osg::Node* sceneCopy =
dynamic_cast(sceneData_->clone(osg::CopyOp::DEEP_COPY_ALL));

Then passing this to another thread where I run:

viewer_ = new osgViewer::Viewer();
viewer_->setSceneData(sceneCopy);

However the behavior seems inconsistent. It either dies on a null reference
inside osgEarth somewhere or it renders an empty scene. I don't think I
fully understand the threading model of OSG, I've read a bit here and
there, but I think there's a lot I'm still missing.

Is there a safe way to copy the scene data and use it to run an isolated
viewer like this in parallel? Is it even safe to run two viewers in
parallel like this at all?

Cheers,
Rob

-- 
_This email and any attachments are confidential and may be privileged. Any 
unauthorized use, disclosure, copying or distribution of the information 
received is prohibited. If you are not the intended recipient please 
contact the sender immediately by return email confirming that you have and 
will delete all communications related to the email and any attachments 
sent to you in error._
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cannot pick HUD text

2019-02-28 Thread Bruce Clay
Hi,

I am using the 3.6.2 branch.  The pick works for the fountain so clicking on 
the color blocks over the fountain will report  back but not the others.

Also the osgPick app does not support the --screen 0 command line option


Thank you!

Cheers,
Bruce

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75672#75672





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] show mouse cursor in embedded osg

2019-02-28 Thread Sebastian Schmidt
How can i show the default osg mouse cursor in a embedded opengl context 
(GraphicsWindowEmbedded) ?
i tried embeddedWindow->useCursor(true), but i didnt work.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75671#75671





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cannot pick HUD text

2019-02-28 Thread Robert Osfield
On Thu, 28 Feb 2019 at 16:10, Chris Hanson  wrote:
> I think it used to work. Strange. I am not where I can test it right now. Can 
> anyone else confirm?

I can pick the coloured rectangles in the HUD of osgpick built from
the 3.6 branch.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cannot pick HUD text

2019-02-28 Thread Chris Hanson
I think it used to work. Strange. I am not where I can test it right now.
Can anyone else confirm?

On Thu, Feb 28, 2019 at 4:34 PM Bruce Clay  wrote:

> Hi,
>
> I used the osgPick example to create a HUD in my app but do not get any
> hits from the text.  I went back to the osgPick example itself and it does
> not get any hits from the text either.  Is there any way to use a HUD to
> select text and use it to control operations?
>
> Thank you!
>
> Cheers,
> Bruce
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75668#75668
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Cannot pick HUD text

2019-02-28 Thread Bruce Clay
Hi,

I used the osgPick example to create a HUD in my app but do not get any hits 
from the text.  I went back to the osgPick example itself and it does not get 
any hits from the text either.  Is there any way to use a HUD to select text 
and use it to control operations?

Thank you!

Cheers,
Bruce

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75668#75668





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] hidden geometry in embedded osg

2019-02-28 Thread Sebastian Schmidt
i fixed it by setting:

Code:
stateset->setRenderBinDetails(11,"RenderBin");




OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75667#75667





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org