Re: [osg-users] Bug in osgGA::EventQueue?

2012-06-20 Thread Robert Osfield
Hi Anthony,

I don't have any answers from a first read through, and it's not a
problem that's been reported as far as I can recall off the top of my
head, so it'll probably require a code review of the relevant code and
discussion to spot what might be amiss.  Which version of the OSG are
you using?  Has the bug appeared when moving between OSG versions or
changing your usage model of the OSG?

Robert.

On 20 June 2012 06:28, I-Nixon, Anthony D anthony.d.ni...@boeing.com wrote:
 Hi Everyone:



 I’m seeing behavior in my application whereby an osg Window will come up,
 but won’t respond to any events for a few (sometimes 10 or more seconds).
 Rendering is happening during this time, but no event processing.



 I tracked it down to the following:



 1.  The event queue is constructed and initializes _startTick

 2.  Some events are pushed onto the queue (not explicitly, could be
 mouse move, etc)

 3.  Some time passes (generally related to model loading – we are using
 osgEarth)

 4.  Rendering starts and calls setStartTick() on the event queue with a
 new time.

 5.  takeEvents() is called during event traversal, but because the
 startTick has been reset, the top event is in the “future” and takeEvents()
 returns nothing.

 6.  Eventually enough time passes so that the event is no longer in the
 “future” and event processing starts happening.



 The time that the stall lasts for is clearly related to how long step 3
 takes – which can be lengthy when osgEarth is fetching stuff off the
 network.



 I fixed it by clearing out the events when setStartTick is called, viz:





 void EventQueue::setStartTick(osg::Timer_t tick)

 {

  OpenThreads::ScopedLockOpenThreads::Mutex lock(_eventQueueMutex);

  // Since setting the start tick effectively invalidates the time

 // of any events already in the queue, clear it out

  _eventQueue.clear();

  _startTick = tick;

 }



 I haven’t got a sample that reproduces the behavior, but it seems to make
 sense that if the startTick is reset, all the existing events are toast?
 I’m not sure why no one else has seen this – maybe our usage pattern is
 different from the norm?



 Cheers



 Anthony



 Anthony Nixon

 Modelling  Simulation Architect

 Systems Analysis Laboratory (SAL)

 Strategic Development  Experimentation - International

 Boeing Defence Australia Ltd






 ___
 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] FLT, LODs and Light Points

2012-06-20 Thread Paul Martz
Hi Chris -- About 5 years back, I was doing quite a bit of work with FLT light 
points in OSG and don't recall ever encountering an issue with near/far 
computation. If there is an issue with it, it's new since I last tinkered with 
this feature.

   -Paul


On 6/18/2012 3:55 PM, Chris Hanson wrote:

   Had someone consult with me off-list about an issue involving near/far
computation that boiled down to an issue occurring when certain models are paged
into the OSG scene. The user is fairy certain the issue arises when multiple
LODs and Light Points are present in a FLT file. I suspect that this is a red
herring and that the actual cause is more subtle, but perhaps MANIFESTS in a way
that appears like this is the cause. Just on the off chance though, I figured
I'd put out a call for knowledge or insight about whether anyone else had seen
anything fishy happening in FLT files with Light Points messing up the automatic
near/far computation.

   I expect to get sample data to dissect in the next week or so, but I figured
I'd put out a ping now in case there was some issue others were aware of that I
should be on the look out for.

--
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
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR •
Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android



___
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] FLT, LODs and Light Points

2012-06-20 Thread Chris Hanson
On Wed, Jun 20, 2012 at 10:49 AM, Paul Martz pma...@skew-matrix.com wrote:

 Hi Chris -- About 5 years back, I was doing quite a bit of work with FLT
 light points in OSG and don't recall ever encountering an issue with
 near/far computation. If there is an issue with it, it's new since I last
 tinkered with this feature.


  While the issue hasn't been totally nailed down, it now seems to have to
do with pre-set ranges in the TXP file that was loading the FLT models of
structures. It is unclear why light points made any difference, but I think
they were a red herring.

-- 
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
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything :-)

2012-06-20 Thread Peter Bear
libRocket has an integration plugin (osgLibRocket) in the dtEntity trunk, the 
project page for dtEntity is: https://code.google.com/p/dtentity/

Cheers,
Peter

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





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


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything :-)

2012-06-20 Thread Martin Scheffler
Hi all,

my osgLibRocket integration is part of dtEntity, but it is designed to be 
usable stand alone. You can check out
https://dtentity.googlecode.com/svn/trunk/source/osgLibRocket/

Using osgLibRocket together with dtEntity gives you at least two advantages:
* JavaScript integration. You can do stuff like img 
onclick=println('clicked') / - basically the whole GUI can be controlled 
with JavaScript
* dtEntity adds a way to attach libRocket GUI elements to 3d scene objects. 
Elements are repositioned each frame to be on top of their owner 3d object and 
are hidden when it is not visible.

Any tips for improving render performance are highly welcome!
LibRocket performance is OK, but I'm not really a graphics guy, so there are 
probably ways to make rendering faster.

Cheers,
Martin

Best regards,
Martin

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





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