Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Maxim Gammer
Strangely, ffmpeg in my project works fine ...
(in OSG 2.9.7)
Here the log:
ffmpeg:: open (/ home/maximum2000/LABS/transgaz/video/utz1.mov) size (1024,
768) aspect ratio 1
Attaching FFmpegAudioStream

Finished FFmpegImageStream:: run ()
FFmpegAudioStream:: setAudioSink (0)
Assigning 0
Calling av_close_input_file (0xe495a40)
...

And the video plays fine)


Maxim Gammer

2010/2/19 Robert Osfield robert.osfi...@gmail.com

 On Fri, Feb 19, 2010 at 7:46 AM, Maxim Gammer maxgam...@gmail.com wrote:
  Compiled fine on Ubuntu\Kubuntu 9.10 i386  amd64 (gcc version 4.4.1) All
 my
  programs work fine.

 Excellent news.  Confidence in 2.9.7 being solid just went up ;-)

 Just gotta sort out that pesky OSX crash now!

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Maxim,

2010/2/19 Maxim Gammer maxgam...@gmail.com:
 Strangely, ffmpeg in my project works fine ...
 (in OSG 2.9.7)
 Here the log:
 ffmpeg:: open (/ home/maximum2000/LABS/transgaz/video/utz1.mov) size (1024,
 768) aspect ratio 1
 Attaching FFmpegAudioStream
 
 Finished FFmpegImageStream:: run ()
 FFmpegAudioStream:: setAudioSink (0)
 Assigning 0
 Calling av_close_input_file (0xe495a40)
 ...

 And the video plays fine)

ffmpeg works fine for me too (Kubuntu 9.04).  I believe the ffmpeg
finding of Rafa's was just co-incindence or the straw that broke the
camels back and not directly related to the issue.

I suspect OSX is destructing the app in an order that is causing
problems i.e. the static before the plugin gets unloaded.

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


Re: [osg-users] Point, edge and face access for catmull clark algorithm

2010-02-19 Thread jago jagoc
Hi Martin,
there are some information in osgModeling::PolyMesh,
...
   /** Create segments used by the edge map */
inline static Segment getSegment( osg::Vec3 p1, osg::Vec3 p2 );

/** Get the edge object in specified edge map from two points. */
static Edge* getEdge( osg::Vec3 p1, osg::Vec3 p2, EdgeMap emap );
 /** Find all edges attached to a face. */
void findEdgeList( Face* f, EdgeList elist );
...
Best regards,
Jagovic

 Hello,

 I found the osgModeling library and it contains a polygon mesh structure for 
 geometries (Vertices-Edges-Faces). Have anyone experience with osgModeling? 
 It is a helpful extension?

 Cheers

 Martin


 Am 10.02.2010 13:50, schrieb Martin Großer:
 Hello,

 i would like implement the catmull clark algorithm in my osg application. 
 Therefore I need to detect the faces and the edges of the arbitrary mesh.
 Have everyone a tip for me for a smart face and edge access or detection?

 The two first steps of the algorithm are:
 1. Add to every face a point.
 2. Add to every edge a point.

 I have no idea for a smart implementation.

 My main goal is to convert a arbitrary mesh into a quad mesh.



 Cheers

 Martin
 ___
 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] outputsize of osgb and osgt

2010-02-19 Thread Torben Dannhauer
Hi,

I have written a clsuter/network module to transport nodes over network
(atm only nodes are serializable, not osg::objects).

I have play a bit with the zlib compressor and the binary and ascii version.

My result was a larger binary result as ASCII result of the identical node.
I didn't expect this, I always thought ascii format is larger than binary..

Do I miss something, or I just my binary cluster implementation buggy?

My Processing-pipline is:
- serialize node to std::stringstream
- extracting string of stringstream and pass it as chr* to the socket.


btw: At the end, when my code is robust and well factored, is there any 
interest to add a cluster-node to OSG to allow highlevel UDP stream over 
network? Something like:

Code:

osg::cluster mycluster = new osg:cluster();
mycluster-init( port, destination address, useCompressor, asAscii );
mycluster-sendNode( mynode);
..
mynode = mycluster-readNode();





Thank you!

Cheers,
Torben

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Rafa,

I really is starting to look like the static
osg::Observer::getGlobalObserverMutex() is being destructed before the
scene graph which is a bit bizzare.

Is this only happening in your app?  Could you try the OSG examples?

Is there anything specific you do about clean up in your app?

Robert.

On Fri, Feb 19, 2010 at 8:28 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 Hi Robert,


 Well.. the crash has moved to other place, I think you are right about
 destructing order, I have a couple of Singletons on my app, and I
 think that things are messing up order destruction :(. Here's the new
 stack trace

 Thread 0 Crashed:
 0   libosg.63.dylib                     0x0051a618
 osg::Referenced::signalObserversAndDelete(bool, bool, bool) const + 72
 1   libosg.63.dylib                     0x00510823 osg::Program::~Program() + 
 483
 2   libosg.63.dylib                     0x00552040
 std::_Rb_treestd::pairosg::StateAttribute::Type, unsigned int,
 std::pairstd::pairosg::StateAttribute::Type, unsigned int const,
 std::pairosg::ref_ptrosg::StateAttribute, unsigned int ,
 std::_Select1ststd::pairstd::pairosg::StateAttribute::Type,
 unsigned int const, std::pairosg::ref_ptrosg::StateAttribute,
 unsigned int  , std::lessstd::pairosg::StateAttribute::Type,
 unsigned int ,
 std::allocatorstd::pairstd::pairosg::StateAttribute::Type, unsigned
 int const, std::pairosg::ref_ptrosg::StateAttribute, unsigned int
  ::_M_erase(std::_Rb_tree_nodestd::pairstd::pairosg::StateAttribute::Type,
 unsigned int const, std::pairosg::ref_ptrosg::StateAttribute,
 unsigned int  *) + 160
 3   libosg.63.dylib                     0x0054da0f osg::StateSet::clear() + 
 207
 4   libosg.63.dylib                     0x0054e572 osg::StateSet::~StateSet() 
 + 34
 5   libosg.63.dylib                     0x004f3a23
 osg::Node::setStateSet(osg::StateSet*) + 387
 6   libosg.63.dylib                     0x004f3f9a osg::Node::~Node() + 42
 7   libosg.63.dylib                     0x0048033c osg::Geode::~Geode() + 268
 8   libosg.63.dylib                     0x004c0613 osg::Group::~Group() + 211
 9   libcrsFX.dylib                      0x00063069
 crsFX::CameraHUD::~CameraHUD() + 57
 10  libosg.63.dylib                     0x004c0613 osg::Group::~Group() + 211
 11  libcrsFX.dylib                      0x0006ab4f
 crsFX::HUDEffect::~HUDEffect() + 95
 12  libcrsFX.dylib                      0x000657e0
 std::_Rb_treestd::basic_stringchar, std::char_traitschar,
 std::allocatorchar , std::pairstd::basic_stringchar,
 std::char_traitschar, std::allocatorchar  const,
 osg::ref_ptrosg::Object ,
 std::_Select1ststd::pairstd::basic_stringchar,
 std::char_traitschar, std::allocatorchar  const,
 osg::ref_ptrosg::Object  , std::lessstd::basic_stringchar,
 std::char_traitschar, std::allocatorchar  ,
 std::allocatorstd::pairstd::basic_stringchar,
 std::char_traitschar, std::allocatorchar  const,
 osg::ref_ptrosg::Object  
::_M_erase(std::_Rb_tree_nodestd::pairstd::basic_stringchar,
 std::char_traitschar, std::allocatorchar  const,
 osg::ref_ptrosg::Object  *) + 176
 13  libcrsFXDB.dylib                    0x00f1341c
 crsFXDB::xml::XMLRegistry::~XMLRegistry() + 44
 14  osgdb_cfx.so                        0x00ecd1d0 __tcf_0 + 112
 15  libSystem.B.dylib                   0x94ffcdbc __cxa_finalize + 241
 16  libSystem.B.dylib                   0x94ffccb0 exit + 33
 17  crsFXLauncher                       0x82bf start + 63


 Next refactor will be using osg XML support and remove mine, so this
 XMLRegistry singleton will disappear.

 Rafa.


 On Fri, Feb 19, 2010 at 9:18 AM, Robert Osfield
 robert.osfi...@gmail.com wrote:
 Hi Maxim,

 2010/2/19 Maxim Gammer maxgam...@gmail.com:
 Strangely, ffmpeg in my project works fine ...
 (in OSG 2.9.7)
 Here the log:
 ffmpeg:: open (/ home/maximum2000/LABS/transgaz/video/utz1.mov) size (1024,
 768) aspect ratio 1
 Attaching FFmpegAudioStream
 
 Finished FFmpegImageStream:: run ()
 FFmpegAudioStream:: setAudioSink (0)
 Assigning 0
 Calling av_close_input_file (0xe495a40)
 ...

 And the video plays fine)

 ffmpeg works fine for me too (Kubuntu 9.04).  I believe the ffmpeg
 finding of Rafa's was just co-incindence or the straw that broke the
 camels back and not directly related to the issue.

 I suspect OSX is destructing the app in an order that is causing
 problems i.e. the static before the plugin gets unloaded.

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




 --
 Rafael Gaitán Linares
 Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
 http://gvsig3d.blogspot.com
 Ciudad Politécnica de la Innovación
 Universidad Politécnica de Valencia
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] outputsize of osgb and osgt

2010-02-19 Thread Robert Osfield
Hi Torben,

The binary should be smaller than the ascii.  Are you findings before
or after compression?

As for merging cluster support, I'd have to know a bit more about what
form it would take.  There are a number of different approach to doing
clusters, each with their own strengths and weaknesses.  I don't know
much about how you are tackling it beyond that you're using the new
serialization support.

Robert.

On Fri, Feb 19, 2010 at 8:27 AM, Torben Dannhauer
z...@saguaro-fight-club.de wrote:
 Hi,

 I have written a clsuter/network module to transport nodes over network
 (atm only nodes are serializable, not osg::objects).

 I have play a bit with the zlib compressor and the binary and ascii version.

 My result was a larger binary result as ASCII result of the identical node.
 I didn't expect this, I always thought ascii format is larger than binary..

 Do I miss something, or I just my binary cluster implementation buggy?

 My Processing-pipline is:
 - serialize node to std::stringstream
 - extracting string of stringstream and pass it as chr* to the socket.


 btw: At the end, when my code is robust and well factored, is there any 
 interest to add a cluster-node to OSG to allow highlevel UDP stream over 
 network? Something like:

 Code:

 osg::cluster mycluster = new osg:cluster();
 mycluster-init( port, destination address, useCompressor, asAscii );
 mycluster-sendNode( mynode);
 ..
 mynode = mycluster-readNode();





 Thank you!

 Cheers,
 Torben

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





 ___
 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] Viewer and old producer getRenderSurface

2010-02-19 Thread Martin Naylor
LOL :) I meant SVN, I have not been around for a whileas you can see.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: 19 February 2010 07:53
To: OpenSceneGraph Users
Subject: Re: [osg-users] Viewer and old producer getRenderSurface

On Fri, Feb 19, 2010 at 7:31 AM, Martin Naylor
martin.nay...@dsl.pipex.com wrote:
 Thanks Robert, will give that a try.
 Checked out the latest CVS last night and all built fine on Windows 7 and
 Visual Studio 2008.Test the Examples a bit later...

Thanks for the testing.  BTW, we haven't use CVS for quite a few years now
:-)
___
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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Rafa Gaitan
PERFECT! :)

Thanks Robert! now closes ok, and all is running perfect.

Singletons sometimes makes life easier.. sometimes not! :)


Rafa.


On Fri, Feb 19, 2010 at 9:50 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 Hi Rafa,

 Based on the assumption that there is ordering of destruction issue
 with the static Observer::getGlobalObserverMutex() I have tweaked
 src/osg/Referenced.cpp to have the lines:

 // helper class for forcing the global mutex to be constructed when
 the library is loaded.
 struct InitGlobalMutexes
 {
    InitGlobalMutexes()
    {
        OSG_NOTICEForcing the creation of the
 Referenced::getGlobalReferencedMutex()std::endl;
        Referenced::getGlobalReferencedMutex();

        OSG_NOTICEForcing the creation of the
 Observer::getGlobalObserverMutex()std::endl;
        Observer::getGlobalObserverMutex();
    }
 };
 static InitGlobalMutexes s_initGlobalMutexes;


 Which basically creates a proxy object to force the initializations of
 the static mutexes, and hopefully this will be done before any of the
 scene graph gets constructed, and with these enforced ordering
 hopefully the order of destruction will be sorted out too.

 The modified src/osg/Referenced.cpp is now attached.  The change to
 ObserverNodePath.cpp can now be reverted as it's taught us all we can
 get from this particular change.

 With your own changes at your end it would be good to toggle it the
 changes on/off so we can re-enable the error and test changes in the
 OSG to see if we can fix it.  I'm keen to see a fix on the OSG side if
 we can as it may well be not just your app that is affected and could
 well be a wider issue that lurks underneath apps unseen most of the
 time and then pops up randomly.

 Thanks for your help,
 Robert.

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





-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
http://gvsig3d.blogspot.com
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Rafa Gaitan
FYI, I've used the Referenced.cpp file you posted to get things running.

On Fri, Feb 19, 2010 at 9:57 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 PERFECT! :)

 Thanks Robert! now closes ok, and all is running perfect.

 Singletons sometimes makes life easier.. sometimes not! :)


 Rafa.


 On Fri, Feb 19, 2010 at 9:50 AM, Robert Osfield
 robert.osfi...@gmail.com wrote:
 Hi Rafa,

 Based on the assumption that there is ordering of destruction issue
 with the static Observer::getGlobalObserverMutex() I have tweaked
 src/osg/Referenced.cpp to have the lines:

 // helper class for forcing the global mutex to be constructed when
 the library is loaded.
 struct InitGlobalMutexes
 {
    InitGlobalMutexes()
    {
        OSG_NOTICEForcing the creation of the
 Referenced::getGlobalReferencedMutex()std::endl;
        Referenced::getGlobalReferencedMutex();

        OSG_NOTICEForcing the creation of the
 Observer::getGlobalObserverMutex()std::endl;
        Observer::getGlobalObserverMutex();
    }
 };
 static InitGlobalMutexes s_initGlobalMutexes;


 Which basically creates a proxy object to force the initializations of
 the static mutexes, and hopefully this will be done before any of the
 scene graph gets constructed, and with these enforced ordering
 hopefully the order of destruction will be sorted out too.

 The modified src/osg/Referenced.cpp is now attached.  The change to
 ObserverNodePath.cpp can now be reverted as it's taught us all we can
 get from this particular change.

 With your own changes at your end it would be good to toggle it the
 changes on/off so we can re-enable the error and test changes in the
 OSG to see if we can fix it.  I'm keen to see a fix on the OSG side if
 we can as it may well be not just your app that is affected and could
 well be a wider issue that lurks underneath apps unseen most of the
 time and then pops up randomly.

 Thanks for your help,
 Robert.

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





 --
 Rafael Gaitán Linares
 Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
 http://gvsig3d.blogspot.com
 Ciudad Politécnica de la Innovación
 Universidad Politécnica de Valencia




-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
http://gvsig3d.blogspot.com
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 8:58 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 FYI, I've used the Referenced.cpp file you posted to get things running.

Excellent news.  I've checked this change in (minus the debugging messages.)

Could you remove all the local changes your made and update to
svn/trunk to make sure that everything now works with svn/trunk.

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


Re: [osg-users] Underwater OSG Video

2010-02-19 Thread Trajce (Nick) Nikolov
Thanks Umut
-Nick


On Fri, Feb 19, 2010 at 10:47 AM, Ufuk ufuk@gmail.com wrote:

 you can add this line to your hosts file which is in mostly in *
 C:\WINDOWS\system32\drivers\etc*:
 than you dont have problem... :)


 208.117.236.69 youtube.com www.youtube.com


 On Fri, Feb 19, 2010 at 9:46 AM, Trajce (Nick) Nikolov 
 nikolov.tra...@gmail.com wrote:

 Hi Umut,

 I am using AdvTor ... It's slow but works

 -Nick



 On Fri, Feb 19, 2010 at 9:00 AM, Ümit Uzun umituzu...@gmail.com wrote:

 You can use some tunnel sites or you can only chance your dns (for
 example 4.2.2.2 or 4.2.2.1):D It works for me in Turkey.

 Ümit Uzun


 2010/2/18 Trajce (Nick) Nikolov nikolov.tra...@gmail.com

 Hi Kim,

 I managed to see the video (thanks to some net tools) ... Looks awesome
 !

 -Nick



 On Thu, Feb 18, 2010 at 3:43 PM, Trajce (Nick) Nikolov 
 nikolov.tra...@gmail.com wrote:

 great .. Thanks !

 -Nick



 On Thu, Feb 18, 2010 at 3:41 PM, Kim Bale kcb...@googlemail.comwrote:

 Really?!

 Blimey, well i'll send you a dropsend link when I get home..

 Fight the power! ;)

 Kim.


 On 18 February 2010 13:39, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Kim,
  I would really like to see the video. However, youtube is forbidden
 in
  Turkey :(
  -Nick
 
 
  On Thu, Feb 18, 2010 at 3:25 PM, Kim Bale kcb...@googlemail.com
 wrote:
 
  Hello all,
  I was going through some old work stuff last night and came across
 this
  video of some work I did with OSG a little while ago. I was
 planning on
  putting it on the osgOcean website since it shows an old version of
 osgOcean
  being used in a practical context, but I thought I'd also post it
 here since
  it's always interesting to see what people are using OSG for.
  This was part of a research project aimed at digitally preserving
  underwater archaeological sites. The majority of the work was
 involved in
  sending ROVs down to gather acoustic and photogrammetric data from
 the sites
  and then reconstructing accurate 3D replicas of the ship wrecks and
 their
  cargo from it.
  However, in order to make this data accessible for the general
 public we
  created this dive simulator that allowed them to explore these 3d
 datasets
  in a realistic setting.
  You'll have to forgive the poor quality, that's youtube for you.
 
 http://www.youtube.com/watch?v=JjG-TSu1KJAfeature=player_embedded#
  Tata,
  Kim.
  ___
  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 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 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




 --
 Ufuk

 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Rafa Gaitan
All working fine now!

Rafa.

On Fri, Feb 19, 2010 at 10:03 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 On Fri, Feb 19, 2010 at 8:58 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 FYI, I've used the Referenced.cpp file you posted to get things running.

 Excellent news.  I've checked this change in (minus the debugging messages.)

 Could you remove all the local changes your made and update to
 svn/trunk to make sure that everything now works with svn/trunk.

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




-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
http://gvsig3d.blogspot.com
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 9:28 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 All working fine now!

Thanks, a great relief :-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi All,

To give you all a chance to thrash the OSG svn/trunk to an inch of
it's life I'm headline for a few hours (to do my weekly long run).
I'll be back at lunchtime, and if all looks well I'll go for making
2.7.9 this afternoon (UK time).

Thanks for all the testing,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] outputsize of osgb and osgt

2010-02-19 Thread Torben Dannhauer
Hi Robert, 

my serialized sizes are:
Ascii format: 137 byte
binary format uncompressed 217 byte (!)
binary format compressed 107 byte.

6 Month ago, I implemented 2 prototypes (TCP, UDP) . My result was, that
TCP is not as fast as UDP, but it was the only possibilty to (nearly) sync  the 
different channel's swap at final draw callback.

On UDP I currently use broadcast, but thats not mandatory. Because of its 
unreliability, my UDP approach is fire and forget. So the slave tries to get as 
much as possible packets (to avoid framentation, the datacontainer must be 
smaller than the max payload of an UDP datagram) and uses the newest one for 
processing.

My TCP approach was to send the frame information at the beginning to all 
slaves, then waits for all slave to report as ready, and if every client is 
ready, the sends the swap command to all clients. This solution was quite slow, 
so at the moment I focus an a UDP solution. 

I don't know which functionalities you would include in a cluster Node.
Only transporting a transport container over network, or also complete frame 
sync?

In my application I use to callbacks, eventdraw callback and finaldraw callback.
At these two positions in the frame, the callbacks act depending of the role as 
master, slave or as standalone. They send information to slaves, receive 
information from master or do nothing.

To make the cluster transparent to the scenegraph independent from the role, I 
implemented a dataIO interface which they query. Beyond this interface, there 
is the cluster driver (slave) or cluster driver + externalLink driver (master).

The ladder connects the visual to its external control source, which can be a 
flighsimulator, a control program or anything else.

My current transport content is:
- viewmatrix
- variables which are used of my objects updater classes
- list of executer command, which can transport a command as enum and some 
parameter (e.g. to change weather at all clusternodes)

This is my current approach. My project will be openscource in some days/weeks 
(depends on my time to set up my trac environment).

Because you are under heavy load, maybe it is best If I continue my project, 
and when its published, you can take a look on it and we can discuss how man of 
the architecture could be abstracted, refactored to your wishes and included as 
cluster framework...


Thank you!

Cheers,
Torben

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





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


[osg-users] Stopping and intersection test when hitting certain nodes

2010-02-19 Thread Christiansen, Brad
Hi all,

 

I have implemented selection within my scene using the
osgUtil::PolytopeIntersector. My scene comprises a VPB based terrain,
with various other object. What I want to be able to do is to select
only those objects that are infront of the terrain.

 

Any suggestions on the best way to achieve this?

 

Cheers,

 

Brad




DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

I am getting a crash when cleaning up dynamic viewer

osg::ref_ptrosgViewer::CompositeViewer viewer;
..
viewer = 0;

  
osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
* obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
  osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
  osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
311 C++
  osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
  
KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
* ptr=0x)  Line 57 C++
 KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++


down to

 virtual void objectDeleted(void* obj)
{
T* ref_obj = static_castT*(obj);

OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
  HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
}
-Nick


On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi All,

 To give you all a chance to thrash the OSG svn/trunk to an inch of
 it's life I'm headline for a few hours (to do my weekly long run).
 I'll be back at lunchtime, and if all looks well I'll go for making
 2.7.9 this afternoon (UK time).

 Thanks for all the testing,
 Robert.
 ___
 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] [osgPlugins] Synchronising DirectShow videos

2010-02-19 Thread Nathan Schofield
Hi, 

I'm currently using the DirectShow plugin to play two videos through 
DirectShow, which works fine and as intended. I require both of these videos to 
play completely in sync with one another, but as they play along they go out of 
sync. I have tried comparing the current frame of each video and if different 
seek them both to the same frame, but that, for obvious reasons, causes the 
videos to stutter.
I did a bit of research into this on the web and came across a post detailing 
several steps to synchronise two DirectShow graphs, the details are below:

* Pick one graph as the master.
* Make sure the master has a clock. This is normally done when going 
active, but you can force it to happen earlier by calling SetDefaultSyncSource 
on the graph.
* Query the graphs for IMediaFilter, get the clock from the master graph 
using GetSyncSource and pass it to the other graphs using SetSyncSource.
* Pause all the graphs.
* Wait until GetState returns S_OK (the pause is complete).
* Get the time from the graph and add 10ms or so.
* Call IMediaFilter::Run on all graphs, passing this time (now + 10ms) as 
the parameter.


Now to implement this I put an exported function into the DirectShow plugin 
which lets me access the _renderer, using this I have implemented the above 
steps as such:

DirectShowImageStream* s1 = dynamic_castDirectShowImageStream*(imagestream1);
DirectShowImageStream* s2 = dynamic_castDirectShowImageStream*(imagestream2);

IReferenceClock* pClock = 0;

s1-getRenderer()-_graphBuilder-SetDefaultSyncSource(); 
s1-getRenderer()-_mediaFilter-GetSyncSource( pClock );  
s2-getRenderer()-_mediaFilter-SetSyncSource( pClock );

s1-getRenderer()-_mediaFilter-Pause();   
s2-getRenderer()-_mediaFilter-Pause();

//while( (s1-getRenderer()-GetState(1000, State_Paused)  
s2-getRenderer()-GetState(1000,State_Paused)) != S_OK )
//{ 
//} 

Sleep(1000);

REFERENCE_TIME time = 0;  

pClock-GetTime(time); 

s1-getRenderer()-_mediaFilter-Run( time + 100 ); 
s2-getRenderer()-_mediaFilter-Run( time + 100 );

As you may notice the wait for the state is commented out as I cant seem to 
find the correct enum for the second GetState parameter, I have add a 
Sleep(1000) to try to compensate.
Using the above code both streams still play out of sync with one another, have 
tested with the same video in both graphs and they do not align, I was hoping 
maybe the author of the DirectShow plugin could advise me as to why this is the 
case? I am new to DirectShow coding so any help anyone can give will be greatly 
appreciated.

The video is encoded in HD using h264 and uses ffdshow codec when playing. 

Thanks Nathan

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Michael Platings
Hi Robert,
I'm also getting a crash when exiting. This is on Windows XP, displaying
cessna.osg in osgviewer. The crash is deep inside the a Windows DLL, but I
get an error message stating that heap corruption is the likely cause.
I'll keep digging...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem displaying textures

2010-02-19 Thread Yashodhan Nevatia
Hi Julien,

The application I am building models augmented reality for a see through 
display. Therefore the camera must integrate the position of the person, as 
well as camera (intrinsic) parameters that reflect the users eye+display 
combination. These I derive using 2D-3D correspondences based on the Single 
Point Active Alignment method developed at Technical University of Munich. 
Since the camera parameters already model a perspective position, the camera 
parameters are meant to be used with an orthogonal projection.

Initially (before I apply parameters corresponding to the eye), the models 
appear fine:
Pose matrix: based on the tracked location and orientation of the head
The camera view matrix is updated as follows: Pose x Default transform
The camera projection matrix is set to (not changed) a perspective projection 
(created using OSG)

After the calibration procedure is performed/applied, the models are not 
textured well:
Calibration matrix: models the position and orientation transform from the 
tracked point to the head, as well the eye
View matrix: Pose x Calibration matrix
Projection matrix: orthogonal projection

The models are loaded using a Collada plugin (though there are also problems 
when I create the model myself following the osgteapot example).

I dont change any other parameters except the camera parameter mentioned above, 
that is the model properties and statesets remain the same.

Thank you,

Yashodhan

- Original Message -
From: Julien Valentin julienvalenti...@gmail.com
To: osg-users@lists.openscenegraph.org
Sent: Thursday, February 18, 2010 7:23:52 PM GMT +01:00 Amsterdam / Berlin / 
Bern / Rome / Stockholm / Vienna
Subject: Re: [osg-users] Problem displaying textures

I think you have to give the code: camera stateset and viewer settings ...
or try to use a manipulator if you think you fails with your perspective 
settings

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





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

-- 
Yashodhan Nevatia
Systems Engineer

Space Applications Services
Leuvensesteenweg 325
B-1932 Zaventem
Belgium
Tel:  +32 (0)2-721.54.84
Fax:  +32 (0)2-721.54.44
URL: www.spaceapplications.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Martin Naylor
Hi Robert,
Just checkout the latest build this around 10.30am and am receiving the
following build errors under Windows 7 and VS2008.
I did check the box wrappers under cmake and these are all wrapper errors.
Hope it helps.

Regards

Martin.






Error   62  error LNK2019: unresolved external symbol
__declspec(dllimport) public: void __thiscall
osgDB::Registry::removeDotOsgWrapper(class osgDB::DotOsgWrapper *)
(__imp_?removedotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
referenced in function public: __thiscall `anonymous
namespace'::reflector79::reflector79(void)
(??0reflecto...@?a0xf54704f2@@q...@xz)  Registry.objWrapper osgDB
Error   63  error LNK2019: unresolved external symbol
__declspec(dllimport) public: void __thiscall
osgDB::Registry::addDotOsgWrapper(class osgDB::DotOsgWrapper *)
(__imp_?adddotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
referenced in function public: __thiscall `anonymous
namespace'::reflector79::reflector79(void)
(??0reflecto...@?a0xf54704f2@@q...@xz)  Registry.objWrapper osgDB
Error   64  fatal error LNK1120: 2 unresolved externals
F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
_osgDBd.dll Wrapper osgDB
Error   65  error LNK2019: unresolved external symbol public: void
__thiscall osgPresentation::AnimationMaterialCallback::update(class
osg::Node )
(?upd...@animationmaterialcallback@osgPresentation@@qaexaavn...@osg@@@Z)
referenced in function public: __thiscall `anonymous
namespace'::reflector155::reflector155(void)
(??0reflector...@?a0x73eee86d@@q...@xz) AnimationMaterial.obj   Wrapper
osgPresentation
Error   66  error LNK2019: unresolved external symbol public: double
__thiscall
osgPresentation::AnimationMaterialCallback::getAnimationTime(void)const 
(?getanimationt...@animationmaterialcallback@osgPresentation@@QBENXZ)
referenced in function public: __thiscall `anonymous
namespace'::reflector155::reflector155(void)
(??0reflector...@?a0x73eee86d@@q...@xz) AnimationMaterial.obj   Wrapper
osgPresentation
Error   67  error LNK2019: unresolved external symbol public: void
__thiscall osgPresentation::AnimationMaterialCallback::setPause(bool)
(?setpa...@animationmaterialcallback@osgPresentation@@qae...@z) referenced
in function public: __thiscall `anonymous
namespace'::reflector155::reflector155(void)
(??0reflector...@?a0x73eee86d@@q...@xz) AnimationMaterial.obj   Wrapper
osgPresentation
Error   68  error LNK2019: unresolved external symbol public: void
__thiscall osgPresentation::AnimationMaterialCallback::reset(void)
(?re...@animationmaterialcallback@osgPresentation@@QAEXXZ) referenced in
function public: __thiscall `anonymous
namespace'::reflector155::reflector155(void)
(??0reflector...@?a0x73eee86d@@q...@xz) AnimationMaterial.obj   Wrapper
osgPresentation
Error   69  error LNK2001: unresolved external symbol public: virtual
void __thiscall osgPresentation::AnimationMaterialCallback::operator()(class
osg::Node *,class osg::NodeVisitor *)
(??ranimationmaterialcallb...@osgpresentation@@uaexpavn...@osg@@PAVNodeVisit
o...@3@@Z)  AnimationMaterial.obj   Wrapper osgPresentation
Error   70  fatal error LNK1120: 5 unresolved externals
F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
_osgPresentationd.dll   Wrapper osgPresentation
Error   71  error LNK2019: unresolved external symbol public: void
__thiscall
osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap(class
std::setclass osg::GraphicsContext *,struct std::lessclass
osg::GraphicsContext *,class std::allocatorclass osg::GraphicsContext * 
,unsigned int)
(?buildcompile...@compileset@incrementalcompileoperat...@osgutil@@QAEXAAV?$s
e...@pavgraphicscontext@osg@@u?$l...@pavgraphicscontext@osg@@@std@@V?$allocato
r...@pavgraphicscontext@osg@@@4@@std@@i...@z) referenced in function public:
__thiscall `anonymous namespace'::reflector218::reflector218(void)
(??0reflector...@?a0xef191a64@@q...@xz) IncrementalCompileOperation.obj
Wrapper osgUtil
Error   72  fatal error LNK1120: 1 unresolved externals
F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
_osgUtild.dll   Wrapper osgUtil

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: 19 February 2010 07:21
To: OpenSceneGraph Users
Subject: Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

On Fri, Feb 19, 2010 at 6:04 AM, Maxim Gammer maxgam...@gmail.com wrote:
 Hi Robert,

 I upgrade to 2.9.7 in the next days

Which is rather too late for making sure svn/trunk is well tested
prior to me tagging 2.9.7... so if 2.9.7 contains problems that
weren't tested and reported prior to 2.9.7 then... it's because... you
hang back from testing.

Please guys we need testing NOW.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread J.P. Delport

Hi Robert,

Robert Osfield wrote:

Hi All,

To give you all a chance to thrash the OSG svn/trunk to an inch of
it's life I'm headline for a few hours (to do my weekly long run).
I'll be back at lunchtime, and if all looks well I'll go for making
2.7.9 this afternoon (UK time).


r11083 looks OK here with some of our apps, Debian sid 32-bit, g++ 4.4.3.

rgds
jp



Thanks for all the testing,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] Problem displaying textures

2010-02-19 Thread Yashodhan Nevatia
Hi all,

I am using libcollada14dom21.dll (and libcollada14dom21-d.dll) with OSG2.8.1.

Thanks,

Yashodhan
- Original Message -
From: Yashodhan Nevatia yashodhan.neva...@spaceapplications.com
To: osg-users@lists.openscenegraph.org
Cc: Rares Ambrus r...@spaceapplications.com
Sent: Friday, February 19, 2010 12:39:49 PM GMT +01:00 Amsterdam / Berlin / 
Bern / Rome / Stockholm / Vienna
Subject: Re: [osg-users] Problem displaying textures

Hi Julien,

The application I am building models augmented reality for a see through 
display. Therefore the camera must integrate the position of the person, as 
well as camera (intrinsic) parameters that reflect the users eye+display 
combination. These I derive using 2D-3D correspondences based on the Single 
Point Active Alignment method developed at Technical University of Munich. 
Since the camera parameters already model a perspective position, the camera 
parameters are meant to be used with an orthogonal projection.

Initially (before I apply parameters corresponding to the eye), the models 
appear fine:
Pose matrix: based on the tracked location and orientation of the head
The camera view matrix is updated as follows: Pose x Default transform
The camera projection matrix is set to (not changed) a perspective projection 
(created using OSG)

After the calibration procedure is performed/applied, the models are not 
textured well:
Calibration matrix: models the position and orientation transform from the 
tracked point to the head, as well the eye
View matrix: Pose x Calibration matrix
Projection matrix: orthogonal projection

The models are loaded using a Collada plugin (though there are also problems 
when I create the model myself following the osgteapot example).

I dont change any other parameters except the camera parameter mentioned above, 
that is the model properties and statesets remain the same.

Thank you,

Yashodhan

- Original Message -
From: Julien Valentin julienvalenti...@gmail.com
To: osg-users@lists.openscenegraph.org
Sent: Thursday, February 18, 2010 7:23:52 PM GMT +01:00 Amsterdam / Berlin / 
Bern / Rome / Stockholm / Vienna
Subject: Re: [osg-users] Problem displaying textures

I think you have to give the code: camera stateset and viewer settings ...
or try to use a manipulator if you think you fails with your perspective 
settings

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





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

-- 
Yashodhan Nevatia
Systems Engineer

Space Applications Services
Leuvensesteenweg 325
B-1932 Zaventem
Belgium
Tel:  +32 (0)2-721.54.84
Fax:  +32 (0)2-721.54.44
URL: www.spaceapplications.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Yashodhan Nevatia
Systems Engineer

Space Applications Services
Leuvensesteenweg 325
B-1932 Zaventem
Belgium
Tel:  +32 (0)2-721.54.84
Fax:  +32 (0)2-721.54.44
URL: www.spaceapplications.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
HI Nick,

I'm afraid I don't have ideas about the cause yet, the line of code
you quote where the crash occurs looks fine, the objects in play
should all still be valid.  Does the error occur on standard OSG
examples?  Does both the release and debug builds crash on exit?

Robert.

On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 Hi Robert,
 I am getting a crash when cleaning up dynamic viewer
 osg::ref_ptrosgViewer::CompositeViewer viewer;
 ..
 viewer = 0;

 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
 * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
   osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
 ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
   osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
 signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
 311 C++
   osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++

 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
 * ptr=0x)  Line 57 C++
 KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++

 down to
  virtual void objectDeleted(void* obj)
         {
             T* ref_obj = static_castT*(obj);
             OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
           HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
         }
 -Nick


 On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi All,

 To give you all a chance to thrash the OSG svn/trunk to an inch of
 it's life I'm headline for a few hours (to do my weekly long run).
 I'll be back at lunchtime, and if all looks well I'll go for making
 2.7.9 this afternoon (UK time).

 Thanks for all the testing,
 Robert.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

It wasnt crashing before. Only now with the latest from the trunk. Let me
try the examples and will get back to you

-Nick


On Fri, Feb 19, 2010 at 4:00 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 HI Nick,

 I'm afraid I don't have ideas about the cause yet, the line of code
 you quote where the crash occurs looks fine, the objects in play
 should all still be valid.  Does the error occur on standard OSG
 examples?  Does both the release and debug builds crash on exit?

 Robert.

 On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I am getting a crash when cleaning up dynamic viewer
  osg::ref_ptrosgViewer::CompositeViewer viewer;
  ..
  viewer = 0;
 
 
 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
  * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
  ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
  signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
  311 C++
osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
 
 
 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
  * ptr=0x)  Line 57 C++
  KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
 
  down to
   virtual void objectDeleted(void* obj)
  {
  T* ref_obj = static_castT*(obj);
  OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
  }
  -Nick
 
 
  On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi All,
 
  To give you all a chance to thrash the OSG svn/trunk to an inch of
  it's life I'm headline for a few hours (to do my weekly long run).
  I'll be back at lunchtime, and if all looks well I'll go for making
  2.7.9 this afternoon (UK time).
 
  Thanks for all the testing,
  Robert.
  ___
  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 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Martin,

Thanks for testing.  The errors are down to two methods that I had
their implementation from Registry into a dedicated companion class,
alas I hadn't removed the declaration though so these methods were
indeed the cause of missing symbols.   I have now removed the
offending methods and updated the wrappers.

Could you do an svn update and let me know that the build now works fine,

Thanks,
Robert.

On Fri, Feb 19, 2010 at 11:40 AM, Martin Naylor
martin.nay...@dsl.pipex.com wrote:
 Hi Robert,
 Just checkout the latest build this around 10.30am and am receiving the
 following build errors under Windows 7 and VS2008.
 I did check the box wrappers under cmake and these are all wrapper errors.
 Hope it helps.

 Regards

 Martin.






 Error   62      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall
 osgDB::Registry::removeDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?removedotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB
 Error   63      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall
 osgDB::Registry::addDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?adddotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB
 Error   64      fatal error LNK1120: 2 unresolved externals
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
 _osgDBd.dll     Wrapper osgDB
 Error   65      error LNK2019: unresolved external symbol public: void
 __thiscall osgPresentation::AnimationMaterialCallback::update(class
 osg::Node )
 (?upd...@animationmaterialcallback@osgPresentation@@qaexaavn...@osg@@@Z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
 osgPresentation
 Error   66      error LNK2019: unresolved external symbol public: double
 __thiscall
 osgPresentation::AnimationMaterialCallback::getAnimationTime(void)const 
 (?getanimationt...@animationmaterialcallback@osgPresentation@@QBENXZ)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
 osgPresentation
 Error   67      error LNK2019: unresolved external symbol public: void
 __thiscall osgPresentation::AnimationMaterialCallback::setPause(bool)
 (?setpa...@animationmaterialcallback@osgPresentation@@qae...@z) referenced
 in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
 osgPresentation
 Error   68      error LNK2019: unresolved external symbol public: void
 __thiscall osgPresentation::AnimationMaterialCallback::reset(void)
 (?re...@animationmaterialcallback@osgPresentation@@QAEXXZ) referenced in
 function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
 osgPresentation
 Error   69      error LNK2001: unresolved external symbol public: virtual
 void __thiscall osgPresentation::AnimationMaterialCallback::operator()(class
 osg::Node *,class osg::NodeVisitor *)
 (??ranimationmaterialcallb...@osgpresentation@@uaexpavn...@osg@@PAVNodeVisit
 o...@3@@Z)        AnimationMaterial.obj   Wrapper osgPresentation
 Error   70      fatal error LNK1120: 5 unresolved externals
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
 _osgPresentationd.dll   Wrapper osgPresentation
 Error   71      error LNK2019: unresolved external symbol public: void
 __thiscall
 osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap(class
 std::setclass osg::GraphicsContext *,struct std::lessclass
 osg::GraphicsContext *,class std::allocatorclass osg::GraphicsContext * 
 ,unsigned int)
 (?buildcompile...@compileset@incrementalcompileoperat...@osgutil@@QAEXAAV?$s
 e...@pavgraphicscontext@osg@@u?$l...@pavgraphicscontext@osg@@@std@@V?$allocato
 r...@pavgraphicscontext@osg@@@4@@std@@i...@z) referenced in function public:
 __thiscall `anonymous namespace'::reflector218::reflector218(void)
 (??0reflector...@?a0xef191a64@@q...@xz)  IncrementalCompileOperation.obj
 Wrapper osgUtil
 Error   72      fatal error LNK1120: 1 unresolved externals
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
 _osgUtild.dll   Wrapper osgUtil

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
 Osfield
 Sent: 19 February 2010 07:21
 To: OpenSceneGraph Users
 

Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-19 Thread Vincent Bourdier

Hi Robert,

I implemented my own ReadFile callback, working well.

Would you (and osg) be interested in having it ? I can submitt in 
directly in osg src.


I implemented if for WIN32 only, so someone should implement the other 
version...
For the moment, it uses psapi.lib ... not very portable but maybe 
someone can help be making it portable and without

other dependencies.

Regards,
  Vincent.

Robert Osfield a écrit :

On Thu, Feb 4, 2010 at 4:23 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
  

What difference will it makes if I return FILE_LOADED or ERROR_IN_READING_FILE ?



If you didn't load the file you shouldn't return a FILE_LOADED, so
since with don't have an INSUFFICIENT_MEMORY_TO_LOAD (or similar) enum
then the closest would be ERROR_IN_READING_FILE.

  

So If I decrease this value, some PagedLod will be released ?



It won't release any right away, but as the frames progress it'll work
to get the max down to your specified target when it's possible.

  

What difference with cameraLODScale ?



The osg::Camera::setLODScale() just changes which children are
selected in the view, it doesn't change the max number of PagedLOD
target, but it will directly affect how many PagedLOD that will be
active in any view.

  

I just made a test
increasing/decreasing this value and I saw the effect on PagedLod and
memory.



Yes, this is exactly how one would expect it to work.

Robert.
  



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4869 (20100215) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

the examples works fine  but My app was working fine as well too :)

-Nick


On Fri, Feb 19, 2010 at 4:08 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Martin,

 Thanks for testing.  The errors are down to two methods that I had
 their implementation from Registry into a dedicated companion class,
 alas I hadn't removed the declaration though so these methods were
 indeed the cause of missing symbols.   I have now removed the
 offending methods and updated the wrappers.

 Could you do an svn update and let me know that the build now works fine,

 Thanks,
 Robert.

 On Fri, Feb 19, 2010 at 11:40 AM, Martin Naylor
 martin.nay...@dsl.pipex.com wrote:
  Hi Robert,
  Just checkout the latest build this around 10.30am and am receiving the
  following build errors under Windows 7 and VS2008.
  I did check the box wrappers under cmake and these are all wrapper
 errors.
  Hope it helps.
 
  Regards
 
  Martin.
 
 
 
 
 
 
  Error   62  error LNK2019: unresolved external symbol
  __declspec(dllimport) public: void __thiscall
  osgDB::Registry::removeDotOsgWrapper(class osgDB::DotOsgWrapper *)
  (__imp_?removedotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
  referenced in function public: __thiscall `anonymous
  namespace'::reflector79::reflector79(void)
  (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.objWrapper osgDB
  Error   63  error LNK2019: unresolved external symbol
  __declspec(dllimport) public: void __thiscall
  osgDB::Registry::addDotOsgWrapper(class osgDB::DotOsgWrapper *)
  (__imp_?adddotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
  referenced in function public: __thiscall `anonymous
  namespace'::reflector79::reflector79(void)
  (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.objWrapper osgDB
  Error   64  fatal error LNK1120: 2 unresolved externals
 
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
  _osgDBd.dll Wrapper osgDB
  Error   65  error LNK2019: unresolved external symbol public: void
  __thiscall osgPresentation::AnimationMaterialCallback::update(class
  osg::Node )
  (?upd...@animationmaterialcallback@osgPresentation@@qaexaavn...@osg@@@Z)
  referenced in function public: __thiscall `anonymous
  namespace'::reflector155::reflector155(void)
  (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
  osgPresentation
  Error   66  error LNK2019: unresolved external symbol public: double
  __thiscall
  osgPresentation::AnimationMaterialCallback::getAnimationTime(void)const 
  (?getanimationt...@animationmaterialcallback@osgPresentation@@QBENXZ)
  referenced in function public: __thiscall `anonymous
  namespace'::reflector155::reflector155(void)
  (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
  osgPresentation
  Error   67  error LNK2019: unresolved external symbol public: void
  __thiscall osgPresentation::AnimationMaterialCallback::setPause(bool)
  (?setpa...@animationmaterialcallback@osgPresentation@@qae...@z)
 referenced
  in function public: __thiscall `anonymous
  namespace'::reflector155::reflector155(void)
  (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
  osgPresentation
  Error   68  error LNK2019: unresolved external symbol public: void
  __thiscall osgPresentation::AnimationMaterialCallback::reset(void)
  (?re...@animationmaterialcallback@osgPresentation@@QAEXXZ) referenced in
  function public: __thiscall `anonymous
  namespace'::reflector155::reflector155(void)
  (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   Wrapper
  osgPresentation
  Error   69  error LNK2001: unresolved external symbol public:
 virtual
  void __thiscall
 osgPresentation::AnimationMaterialCallback::operator()(class
  osg::Node *,class osg::NodeVisitor *)
  (??ranimationmaterialcallb...@osgpresentation@@uaexpavn...@osg
 @@PAVNodeVisit
  o...@3@@Z)AnimationMaterial.obj   Wrapper osgPresentation
  Error   70  fatal error LNK1120: 5 unresolved externals
 
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgwrapper
  _osgPresentationd.dll   Wrapper osgPresentation
  Error   71  error LNK2019: unresolved external symbol public: void
  __thiscall
  osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap(class
  std::setclass osg::GraphicsContext *,struct std::lessclass
  osg::GraphicsContext *,class std::allocatorclass osg::GraphicsContext
 * 
  ,unsigned int)
  (?buildcompile...@compileset@incrementalcompileoperat...@osgutil
 @@QAEXAAV?$s
  e...@pavgraphicscontext@osg@@u?$l...@pavgraphicscontext@osg@@@std@
 @V?$allocato
  r...@pavgraphicscontext@osg@@@4@@std@@i...@z) referenced in function 
  public:
  __thiscall `anonymous namespace'::reflector218::reflector218(void)
  (??0reflector...@?a0xef191a64@@q...@xz)  IncrementalCompileOperation.obj
  Wrapper osgUtil
  Error   72  fatal error LNK1120: 1 unresolved externals
 
 

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
and yes. both configuration crashes

-Nick


On Fri, Feb 19, 2010 at 4:00 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 HI Nick,

 I'm afraid I don't have ideas about the cause yet, the line of code
 you quote where the crash occurs looks fine, the objects in play
 should all still be valid.  Does the error occur on standard OSG
 examples?  Does both the release and debug builds crash on exit?

 Robert.

 On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I am getting a crash when cleaning up dynamic viewer
  osg::ref_ptrosgViewer::CompositeViewer viewer;
  ..
  viewer = 0;
 
 
 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
  * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
  ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
  signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
  311 C++
osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
 
 
 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
  * ptr=0x)  Line 57 C++
  KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
 
  down to
   virtual void objectDeleted(void* obj)
  {
  T* ref_obj = static_castT*(obj);
  OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
  }
  -Nick
 
 
  On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi All,
 
  To give you all a chance to thrash the OSG svn/trunk to an inch of
  it's life I'm headline for a few hours (to do my weekly long run).
  I'll be back at lunchtime, and if all looks well I'll go for making
  2.7.9 this afternoon (UK time).
 
  Thanks for all the testing,
  Robert.
  ___
  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 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] Migrating from 2.8.2 to 2.9.6

2010-02-19 Thread Garrett Cope
Paul,

Yep, exact same system with the same hardware and the same application/models. 
The only difference is compiling with 2.8.2 libraries vs. 2.9.6.

I will try your suggestions and report back.

Thanks for the help,
Garrett

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

On Fri, Feb 19, 2010 at 2:13 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 the examples works fine  but My app was working fine as well too :)

Could you modify osgviewer so that it uses a ref_ptr rather than let
it be created on the stack so mimicing the usage model of your app,
hopefully this will also crash then I can start looking into the issue
at my end

Could you also enclose the ref_ptrComposite/Viewer code into a local
scope by placing { } around it.  This should force destruction clean
up of all the objects create on the start without those brackets,
sometimes this can help isolate the effects of various effects.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Fabien Lavignotte
Hi All,
In order to compile on Windows with Wrappers ON, some exports are still missing 
on osgPresentation::AnimationMaterialCallback and 
osgUtil::IncrementalCompileOperation::CompileSet.
Regards,
Fabien

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: vendredi 19 février 2010 15:08
To: OpenSceneGraph Users
Subject: Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

Hi Martin,

Thanks for testing.  The errors are down to two methods that I had their 
implementation from Registry into a dedicated companion class, alas I hadn't 
removed the declaration though so these methods were
indeed the cause of missing symbols.   I have now removed the
offending methods and updated the wrappers.

Could you do an svn update and let me know that the build now works fine,

Thanks,
Robert.

On Fri, Feb 19, 2010 at 11:40 AM, Martin Naylor martin.nay...@dsl.pipex.com 
wrote:
 Hi Robert,
 Just checkout the latest build this around 10.30am and am receiving 
 the following build errors under Windows 7 and VS2008.
 I did check the box wrappers under cmake and these are all wrapper errors.
 Hope it helps.

 Regards

 Martin.






 Error   62      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall 
 osgDB::Registry::removeDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?removedotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous 
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB 
 Error   63      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall 
 osgDB::Registry::addDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?adddotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous 
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB 
 Error   64      fatal error LNK1120: 2 unresolved externals 
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgw
 rapper
 _osgDBd.dll     Wrapper osgDB
 Error   65      error LNK2019: unresolved external symbol public: 
 void __thiscall 
 osgPresentation::AnimationMaterialCallback::update(class
 osg::Node )
 (?upd...@animationmaterialcallback@osgPresentation@@qaexaavn...@osg@@@
 Z) referenced in function public: __thiscall `anonymous 
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   
 Wrapper osgPresentation Error   66      error LNK2019: unresolved 
 external symbol public: double __thiscall 
 osgPresentation::AnimationMaterialCallback::getAnimationTime(void)const 
 (?getanimationt...@animationmaterialcallback@osgPresentation@@QBENXZ)
 referenced in function public: __thiscall `anonymous 
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   
 Wrapper osgPresentation Error   67      error LNK2019: unresolved 
 external symbol public: void __thiscall 
 osgPresentation::AnimationMaterialCallback::setPause(bool)
 (?setpa...@animationmaterialcallback@osgPresentation@@qae...@z) 
 referenced in function public: __thiscall `anonymous 
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   
 Wrapper osgPresentation Error   68      error LNK2019: unresolved 
 external symbol public: void __thiscall 
 osgPresentation::AnimationMaterialCallback::reset(void)
 (?re...@animationmaterialcallback@osgPresentation@@QAEXXZ) referenced 
 in function public: __thiscall `anonymous 
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj   
 Wrapper osgPresentation Error   69      error LNK2001: unresolved 
 external symbol public: virtual void __thiscall 
 osgPresentation::AnimationMaterialCallback::operator()(class
 osg::Node *,class osg::NodeVisitor *)
 (??ranimationmaterialcallb...@osgpresentation@@uaexpavn...@osg@@PAVNod
 eVisit
 o...@3@@Z)        AnimationMaterial.obj   Wrapper osgPresentation Error   
 70      fatal error LNK1120: 5 unresolved externals 
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgw
 rapper _osgPresentationd.dll   Wrapper osgPresentation Error   71      
 error LNK2019: unresolved external symbol public: void __thiscall 
 osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap(clas
 s std::setclass osg::GraphicsContext *,struct std::lessclass 
 osg::GraphicsContext *,class std::allocatorclass 
 osg::GraphicsContext *  ,unsigned int)
 (?buildcompile...@compileset@incrementalcompileoperat...@osgutil@@QAEX
 AAV?$s 
 e...@pavgraphicscontext@osg@@u?$l...@pavgraphicscontext@osg@@@std@@V?$al
 locato
 r...@pavgraphicscontext@osg@@@4@@std@@i...@z) referenced in function public:

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Thanks Fabien, fixes now merged and submitted to svn/trunk.

On Fri, Feb 19, 2010 at 2:21 PM, Fabien Lavignotte
fabien.lavigno...@vegatechnologies.fr wrote:
 Hi All,
 In order to compile on Windows with Wrappers ON, some exports are still 
 missing on osgPresentation::AnimationMaterialCallback and 
 osgUtil::IncrementalCompileOperation::CompileSet.
 Regards,
 Fabien

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert 
 Osfield
 Sent: vendredi 19 février 2010 15:08
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

 Hi Martin,

 Thanks for testing.  The errors are down to two methods that I had their 
 implementation from Registry into a dedicated companion class, alas I hadn't 
 removed the declaration though so these methods were
 indeed the cause of missing symbols.   I have now removed the
 offending methods and updated the wrappers.

 Could you do an svn update and let me know that the build now works fine,

 Thanks,
 Robert.

 On Fri, Feb 19, 2010 at 11:40 AM, Martin Naylor martin.nay...@dsl.pipex.com 
 wrote:
 Hi Robert,
 Just checkout the latest build this around 10.30am and am receiving
 the following build errors under Windows 7 and VS2008.
 I did check the box wrappers under cmake and these are all wrapper errors.
 Hope it helps.

 Regards

 Martin.






 Error   62      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall
 osgDB::Registry::removeDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?removedotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB
 Error   63      error LNK2019: unresolved external symbol
 __declspec(dllimport) public: void __thiscall
 osgDB::Registry::addDotOsgWrapper(class osgDB::DotOsgWrapper *)
 (__imp_?adddotosgwrap...@registry@osgDB@@qaexpavdotosgwrap...@2@@Z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector79::reflector79(void)
 (??0reflecto...@?a0xf54704f2@@q...@xz)   Registry.obj    Wrapper osgDB
 Error   64      fatal error LNK1120: 2 unresolved externals
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgw
 rapper
 _osgDBd.dll     Wrapper osgDB
 Error   65      error LNK2019: unresolved external symbol public:
 void __thiscall
 osgPresentation::AnimationMaterialCallback::update(class
 osg::Node )
 (?upd...@animationmaterialcallback@osgPresentation@@qaexaavn...@osg@@@
 Z) referenced in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj
 Wrapper osgPresentation Error   66      error LNK2019: unresolved
 external symbol public: double __thiscall
 osgPresentation::AnimationMaterialCallback::getAnimationTime(void)const 
 (?getanimationt...@animationmaterialcallback@osgPresentation@@QBENXZ)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj
 Wrapper osgPresentation Error   67      error LNK2019: unresolved
 external symbol public: void __thiscall
 osgPresentation::AnimationMaterialCallback::setPause(bool)
 (?setpa...@animationmaterialcallback@osgPresentation@@qae...@z)
 referenced in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj
 Wrapper osgPresentation Error   68      error LNK2019: unresolved
 external symbol public: void __thiscall
 osgPresentation::AnimationMaterialCallback::reset(void)
 (?re...@animationmaterialcallback@osgPresentation@@QAEXXZ) referenced
 in function public: __thiscall `anonymous
 namespace'::reflector155::reflector155(void)
 (??0reflector...@?a0x73eee86d@@q...@xz)  AnimationMaterial.obj
 Wrapper osgPresentation Error   69      error LNK2001: unresolved
 external symbol public: virtual void __thiscall
 osgPresentation::AnimationMaterialCallback::operator()(class
 osg::Node *,class osg::NodeVisitor *)
 (??ranimationmaterialcallb...@osgpresentation@@uaexpavn...@osg@@PAVNod
 eVisit
 o...@3@@Z)        AnimationMaterial.obj   Wrapper osgPresentation Error
 70      fatal error LNK1120: 5 unresolved externals
 F:\Coding\OSG\OpenSceneGraph\bin\Debug\..\..\bin\osgPlugins-2.9.7\osgw
 rapper _osgPresentationd.dll   Wrapper osgPresentation Error   71
 error LNK2019: unresolved external symbol public: void __thiscall
 osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap(clas
 s std::setclass osg::GraphicsContext *,struct std::lessclass
 osg::GraphicsContext *,class std::allocatorclass
 osg::GraphicsContext *  ,unsigned int)
 (?buildcompile...@compileset@incrementalcompileoperat...@osgutil@@QAEX
 AAV?$s
 

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

I did so. The modified example works with dynamic viewer
construction/destruction. The only difference is that my viewer is in a dll
and it is constructed/destructed there

-Nick


On Fri, Feb 19, 2010 at 4:21 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 2:13 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  the examples works fine  but My app was working fine as well too :)

 Could you modify osgviewer so that it uses a ref_ptr rather than let
 it be created on the stack so mimicing the usage model of your app,
 hopefully this will also crash then I can start looking into the issue
 at my end

 Could you also enclose the ref_ptrComposite/Viewer code into a local
 scope by placing { } around it.  This should force destruction clean
 up of all the objects create on the start without those brackets,
 sometimes this can help isolate the effects of various effects.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
And it crashes on the mutex lock

-Nick


On Fri, Feb 19, 2010 at 4:32 PM, Trajce (Nick) Nikolov 
nikolov.tra...@gmail.com wrote:

 Hi Robert,

 I did so. The modified example works with dynamic viewer
 construction/destruction. The only difference is that my viewer is in a dll
 and it is constructed/destructed there

  -Nick



 On Fri, Feb 19, 2010 at 4:21 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 2:13 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  the examples works fine  but My app was working fine as well too :)

 Could you modify osgviewer so that it uses a ref_ptr rather than let
 it be created on the stack so mimicing the usage model of your app,
 hopefully this will also crash then I can start looking into the issue
 at my end

 Could you also enclose the ref_ptrComposite/Viewer code into a local
 scope by placing { } around it.  This should force destruction clean
 up of all the objects create on the start without those brackets,
 sometimes this can help isolate the effects of various effects.

 Robert.
 ___
 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] [osgPlugins] Synchronising DirectShow videos

2010-02-19 Thread Robert Osfield
HI Nathan,

I now nothing about DirectShow so I can't comment on the
API/impementation details of what you are trying to achieve.  What I
can say is that when I've done stereo movie rendering with the OSG
we've rendered the two movies streams into a single movie then use
texture coordinates to pick out the two halves.  The osgstereoimage
example shows how it's done for side by side Image, and the same code
works for an ImageStream too.

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


[osg-users] [osgPPU] Ploblems with anaglyph stereo rendering

2010-02-19 Thread Christian Richardt
Dear all,

I have been trying to apply osgPPU for stereo rendering and that
appeared to work. However, when I took a closer look at the anaglyph
rendering of the osgppu_dof example (run it with --stereo), I noticed
that it does not work as expected (running the osgPPU pipeline on both
views, then applying anaglyph), even though it kind of looks
plausible. What happens instead is that the left render pass
executes the pipeline on a red cow (osg uses colormasks for rendering
the anaglyph). In the second pass, osg additionally renders the cyan
parts into the same input texture and runs the right pipeline pass
based on it. For the second frame, the input texture is still the
previous anaglyph with updated red-channel. Both passes are using the
correct depth buffer for their view.

This problem is bugging me, as the same stereo pipeline works
correctly with quad-buffered stereo.

I think the fix would be to render both left and right views in full
colour and then combine them in a shader to compute the final anaglyph
image. This way it would also be possible to support other types of
anaglyph, such as red-blue, green-magenta [1] or blue-amber [2], which
may not be easily implemented using RGB colour masks.

My question is: would this be a useful modification of osg? What do
other people think?

Thanks,
Christian.

[1] http://www.3dglassesonline.com/trioscopics/
[2] http://www.colorcode3d.com/Home.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-19 Thread Robert Osfield
Hi Vincent,

On Fri, Feb 19, 2010 at 2:09 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
 I implemented my own ReadFile callback, working well.

Yay! :-)

 Would you (and osg) be interested in having it ? I can submitt in directly
 in osg src.

It's probably a bit too domain specific to be part of the OSG, perhaps
an example with it in would be good, or an example on the wiki so that
if others want to use the same techniques then they could deploy.

 I implemented if for WIN32 only, so someone should implement the other
 version...
 For the moment, it uses psapi.lib ... not very portable but maybe someone
 can help be making it portable and without
 other dependencies.


I don't even know was psapi.lib is... ;-)

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


Re: [osg-users] [osgPlugins] Synchronising DirectShow videos

2010-02-19 Thread Nathan Schofield
Hi Robert, 

My code is actually based on the stereo image example, but I am using two 
ImageStreams instead of the one. My application actually allows you load images 
or movies and renders them to two textures which you can then move around just 
like the example. It seems I may have to get the two movies into just one like 
you suggest, but like you I have no experience in DirectShow. Could you go into 
more details as to how you tackled it, and maybe I could adapt the same 
approach for 
my software.
 
Once again thanks for the help.

Cheers,
Nathan

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

On Fri, Feb 19, 2010 at 2:38 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 And it crashes on the mutex lock

Ahhh, good at least we have something to gone on it tracking down what
is going wrong. It does sound kinda similar to the issue that Rafa had
with destruction under OSX, but I've already checked in a fix for this
which Rafa confirmed has worked.  Is there any chance you haven't
updated to the latest svn/trunk that includes the changes for fixing
things under OSX?

The issue under OSX was that the clean up of the app destructed the
GlobalObserverMutex before the scene graph/viewer, and then when it
came to clean up these structures the mutex pointer was invalid.

If the fix for OSX doesn't work and still the static
GlobalObserverMutex is getting destructed before the viewer then we
could possible add a check into mutex locking code so that if the
pointer has been reset to 0 then don't attempt to lock it.  The
GlobalObserMutex uses a custom smart pointer class to make sure the
pointer is reset to 0 after deletion of the object so it should be
possible to test against it at runtime as well as in the debugger.

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


Re: [osg-users] [osgPlugins] Synchronising DirectShow videos

2010-02-19 Thread Robert Osfield
Hi Nathan,

I don't personally have a methodology for creating side by side video
- I've just requested stereo movies for the modellers I've worked
with, then just use movie tools on the Mac to re-render the movies
into a single side by side movie.

My guess is that you could probably code up a solution using ffmpeg
without too much difficulty.

Robert.

On Fri, Feb 19, 2010 at 2:48 PM, Nathan Schofield
john.smith.jsmit...@googlemail.com wrote:
 Hi Robert,

 My code is actually based on the stereo image example, but I am using two 
 ImageStreams instead of the one. My application actually allows you load 
 images or movies and renders them to two textures which you can then move 
 around just like the example. It seems I may have to get the two movies into 
 just one like you suggest, but like you I have no experience in DirectShow. 
 Could you go into more details as to how you tackled it, and maybe I could 
 adapt the same approach for
 my software.

 Once again thanks for the help.

 Cheers,
 Nathan

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





 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

I am up to date, before you went running :). I was following this thread
carefully today. The update I did just now has not affected the pointers
stuff

The idea about checking the validation of the mutex is good idea. I am
trying it right now

-Nick


On Fri, Feb 19, 2010 at 4:52 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 2:38 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  And it crashes on the mutex lock

 Ahhh, good at least we have something to gone on it tracking down what
 is going wrong. It does sound kinda similar to the issue that Rafa had
 with destruction under OSX, but I've already checked in a fix for this
 which Rafa confirmed has worked.  Is there any chance you haven't
 updated to the latest svn/trunk that includes the changes for fixing
 things under OSX?

 The issue under OSX was that the clean up of the app destructed the
 GlobalObserverMutex before the scene graph/viewer, and then when it
 came to clean up these structures the mutex pointer was invalid.

 If the fix for OSX doesn't work and still the static
 GlobalObserverMutex is getting destructed before the viewer then we
 could possible add a check into mutex locking code so that if the
 pointer has been reset to 0 then don't attempt to lock it.  The
 GlobalObserMutex uses a custom smart pointer class to make sure the
 pointer is reset to 0 after deletion of the object so it should be
 possible to test against it at runtime as well as in the debugger.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
hum . the _mutex in observer_ptr is pure pointer. No smart thing on it.
How you want to check it?

-Nick


On Fri, Feb 19, 2010 at 5:01 PM, Trajce (Nick) Nikolov 
nikolov.tra...@gmail.com wrote:

 Hi Robert,

 I am up to date, before you went running :). I was following this thread
 carefully today. The update I did just now has not affected the pointers
 stuff

 The idea about checking the validation of the mutex is good idea. I am
 trying it right now

 -Nick



 On Fri, Feb 19, 2010 at 4:52 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 2:38 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  And it crashes on the mutex lock

 Ahhh, good at least we have something to gone on it tracking down what
 is going wrong. It does sound kinda similar to the issue that Rafa had
 with destruction under OSX, but I've already checked in a fix for this
 which Rafa confirmed has worked.  Is there any chance you haven't
 updated to the latest svn/trunk that includes the changes for fixing
 things under OSX?

 The issue under OSX was that the clean up of the app destructed the
 GlobalObserverMutex before the scene graph/viewer, and then when it
 came to clean up these structures the mutex pointer was invalid.

 If the fix for OSX doesn't work and still the static
 GlobalObserverMutex is getting destructed before the viewer then we
 could possible add a check into mutex locking code so that if the
 pointer has been reset to 0 then don't attempt to lock it.  The
 GlobalObserMutex uses a custom smart pointer class to make sure the
 pointer is reset to 0 after deletion of the object so it should be
 possible to test against it at runtime as well as in the debugger.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

I was just reviewing your the code you copied in your earlier message
(below) and spotted that the observer_ptr was access a local mutex
not the GlobalObserverMutex() as it should have been.  I've just fixed
observer_ptr and am currently rebuilding.  Could you try the
attached include/osg/observer_ptr.

I do testing at my end if everything goes smoothly will check the
change in.  I really don't know if it would fix the problem you are
seeing, fingers crossed.

Robert.

On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 Hi Robert,
 I am getting a crash when cleaning up dynamic viewer
 osg::ref_ptrosgViewer::CompositeViewer viewer;
 ..
 viewer = 0;

 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
 * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
   osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
 ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
   osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
 signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
 311 C++
   osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++

 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
 * ptr=0x)  Line 57 C++
 KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++

 down to
  virtual void objectDeleted(void* obj)
         {
             T* ref_obj = static_castT*(obj);
             OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
           HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
         }
 -Nick


 On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi All,

 To give you all a chance to thrash the OSG svn/trunk to an inch of
 it's life I'm headline for a few hours (to do my weekly long run).
 I'll be back at lunchtime, and if all looks well I'll go for making
 2.7.9 this afternoon (UK time).

 Thanks for all the testing,
 Robert.
 ___
 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




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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

I just got a build error with the modified observer_ptr.  I fixed
this build error in the file attached so please use this one.

Cheers,
Robert.


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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
rebuilding ...
-Nick


On Fri, Feb 19, 2010 at 5:16 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 I was just reviewing your the code you copied in your earlier message
 (below) and spotted that the observer_ptr was access a local mutex
 not the GlobalObserverMutex() as it should have been.  I've just fixed
 observer_ptr and am currently rebuilding.  Could you try the
 attached include/osg/observer_ptr.

 I do testing at my end if everything goes smoothly will check the
 change in.  I really don't know if it would fix the problem you are
 seeing, fingers crossed.

 Robert.

 On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I am getting a crash when cleaning up dynamic viewer
  osg::ref_ptrosgViewer::CompositeViewer viewer;
  ..
  viewer = 0;
 
 
 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
  * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
  ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
  signalUnreferened=true, bool signalDelete=true, bool doDelete=true)  Line
  311 C++
osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
 
 
 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
  * ptr=0x)  Line 57 C++
  KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
 
  down to
   virtual void objectDeleted(void* obj)
  {
  T* ref_obj = static_castT*(obj);
  OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
  }
  -Nick
 
 
  On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi All,
 
  To give you all a chance to thrash the OSG svn/trunk to an inch of
  it's life I'm headline for a few hours (to do my weekly long run).
  I'll be back at lunchtime, and if all looks well I'll go for making
  2.7.9 this afternoon (UK time).
 
  Thanks for all the testing,
  Robert.
  ___
  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 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
got this Error while building


SceneView.cpp
4D:\OpenSceneGraph\include\osg/observer_ptr(54) : error C2664:
'OpenThreads::ScopedLockM::ScopedLock(const OpenThreads::ScopedLockM )'
: cannot convert parameter 1 from 'OpenThreads::Mutex *' to 'const
OpenThreads::ScopedLockM '
4with
4[
4M=OpenThreads::Mutex
4]
4Reason: cannot convert from 'OpenThreads::Mutex *' to 'const
OpenThreads::ScopedLockM'
4with
4[
4M=OpenThreads::Mutex
4]
4No constructor could take the source type, or constructor overload
resolution was ambiguous
4D:\OpenSceneGraph\include\osg/observer_ptr(51) : while compiling
class template member function 'osg::observer_ptrT
osg::observer_ptrT::operator =(const osg::observer_ptrT )'
4with
4[
4T=osg::Camera
4]
4D:\OpenSceneGraph\include\osgUtil/SceneView(523) : see reference
to class template instantiation 'osg::observer_ptrT' being compiled
4with
4[
4T=osg::Camera
4]

-Nick


On Fri, Feb 19, 2010 at 5:19 PM, Trajce (Nick) Nikolov 
nikolov.tra...@gmail.com wrote:

 rebuilding ...
 -Nick



 On Fri, Feb 19, 2010 at 5:16 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nick,

 I was just reviewing your the code you copied in your earlier message
 (below) and spotted that the observer_ptr was access a local mutex
 not the GlobalObserverMutex() as it should have been.  I've just fixed
 observer_ptr and am currently rebuilding.  Could you try the
 attached include/osg/observer_ptr.

 I do testing at my end if everything goes smoothly will check the
 change in.  I really don't know if it would fix the problem you are
 seeing, fingers crossed.

 Robert.

 On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I am getting a crash when cleaning up dynamic viewer
  osg::ref_ptrosgViewer::CompositeViewer viewer;
  ..
  viewer = 0;
 
 
 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
  * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
  ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
  signalUnreferened=true, bool signalDelete=true, bool doDelete=true)
  Line
  311 C++
osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
 
 
 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
  * ptr=0x)  Line 57 C++
  KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
 
  down to
   virtual void objectDeleted(void* obj)
  {
  T* ref_obj = static_castT*(obj);
  OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
  }
  -Nick
 
 
  On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi All,
 
  To give you all a chance to thrash the OSG svn/trunk to an inch of
  it's life I'm headline for a few hours (to do my weekly long run).
  I'll be back at lunchtime, and if all looks well I'll go for making
  2.7.9 this afternoon (UK time).
 
  Thanks for all the testing,
  Robert.
  ___
  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 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
looks like I am on faster machine LOL :)
-Nick


On Fri, Feb 19, 2010 at 5:18 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 I just got a build error with the modified observer_ptr.  I fixed
 this build error in the file attached so please use this one.

 Cheers,
 Robert.

 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

Did you use the second of observer_ptr header that I posted?  As I
believe this addresses the issue you've got - my build failed here
with my first cut, I fixed it and posted the new observer_ptr header.
Since then my build has completed without problems.

Robert.

On Fri, Feb 19, 2010 at 3:24 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 got this Error while building

SceneView.cpp
 4D:\OpenSceneGraph\include\osg/observer_ptr(54) : error C2664:
 'OpenThreads::ScopedLockM::ScopedLock(const OpenThreads::ScopedLockM )'
 : cannot convert parameter 1 from 'OpenThreads::Mutex *' to 'const
 OpenThreads::ScopedLockM '
 4        with
 4        [
 4            M=OpenThreads::Mutex
 4        ]
 4        Reason: cannot convert from 'OpenThreads::Mutex *' to 'const
 OpenThreads::ScopedLockM'
 4        with
 4        [
 4            M=OpenThreads::Mutex
 4        ]
 4        No constructor could take the source type, or constructor overload
 resolution was ambiguous
 4        D:\OpenSceneGraph\include\osg/observer_ptr(51) : while compiling
 class template member function 'osg::observer_ptrT
 osg::observer_ptrT::operator =(const osg::observer_ptrT )'
 4        with
 4        [
 4            T=osg::Camera
 4        ]
 4        D:\OpenSceneGraph\include\osgUtil/SceneView(523) : see reference
 to class template instantiation 'osg::observer_ptrT' being compiled
 4        with
 4        [
 4            T=osg::Camera
 4        ]
 -Nick


 On Fri, Feb 19, 2010 at 5:19 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:

 rebuilding ...
 -Nick


 On Fri, Feb 19, 2010 at 5:16 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi Nick,

 I was just reviewing your the code you copied in your earlier message
 (below) and spotted that the observer_ptr was access a local mutex
 not the GlobalObserverMutex() as it should have been.  I've just fixed
 observer_ptr and am currently rebuilding.  Could you try the
 attached include/osg/observer_ptr.

 I do testing at my end if everything goes smoothly will check the
 change in.  I really don't know if it would fix the problem you are
 seeing, fingers crossed.

 Robert.

 On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I am getting a crash when cleaning up dynamic viewer
  osg::ref_ptrosgViewer::CompositeViewer viewer;
  ..
  viewer = 0;
 
 
  osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
  * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
    osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
  ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
    osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
  signalUnreferened=true, bool signalDelete=true, bool doDelete=true)
   Line
  311 C++
    osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
 
 
  KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
  * ptr=0x)  Line 57 C++
  KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
 
  down to
   virtual void objectDeleted(void* obj)
          {
              T* ref_obj = static_castT*(obj);
              OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
            HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
          }
  -Nick
 
 
  On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield
  robert.osfi...@gmail.com
  wrote:
 
  Hi All,
 
  To give you all a chance to thrash the OSG svn/trunk to an inch of
  it's life I'm headline for a few hours (to do my weekly long run).
  I'll be back at lunchtime, and if all looks well I'll go for making
  2.7.9 this afternoon (UK time).
 
  Thanks for all the testing,
  Robert.
  ___
  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 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-19 Thread Vincent Bourdier

Hi Robert,

osgcallback already implements a ReadFilecallback... so I don't know if 
it will be useful to make an example.
If you want I can make a wiki page, but for that could you tell me were 
to put it ?


Thanks.

Regards,
  Vincent.

Robert Osfield a écrit :

Hi Vincent,

On Fri, Feb 19, 2010 at 2:09 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
  

I implemented my own ReadFile callback, working well.



Yay! :-)

  

Would you (and osg) be interested in having it ? I can submitt in directly
in osg src.



It's probably a bit too domain specific to be part of the OSG, perhaps
an example with it in would be good, or an example on the wiki so that
if others want to use the same techniques then they could deploy.

  

I implemented if for WIN32 only, so someone should implement the other
version...
For the moment, it uses psapi.lib ... not very portable but maybe someone
can help be making it portable and without
other dependencies.




I don't even know was psapi.lib is... ;-)

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



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4880 (20100219) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
yes. I am using the second post. Building so far good
-Nick


On Fri, Feb 19, 2010 at 5:40 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 Did you use the second of observer_ptr header that I posted?  As I
 believe this addresses the issue you've got - my build failed here
 with my first cut, I fixed it and posted the new observer_ptr header.
 Since then my build has completed without problems.

 Robert.

 On Fri, Feb 19, 2010 at 3:24 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  got this Error while building
 
 SceneView.cpp
  4D:\OpenSceneGraph\include\osg/observer_ptr(54) : error C2664:
  'OpenThreads::ScopedLockM::ScopedLock(const OpenThreads::ScopedLockM
 )'
  : cannot convert parameter 1 from 'OpenThreads::Mutex *' to 'const
  OpenThreads::ScopedLockM '
  4with
  4[
  4M=OpenThreads::Mutex
  4]
  4Reason: cannot convert from 'OpenThreads::Mutex *' to 'const
  OpenThreads::ScopedLockM'
  4with
  4[
  4M=OpenThreads::Mutex
  4]
  4No constructor could take the source type, or constructor
 overload
  resolution was ambiguous
  4D:\OpenSceneGraph\include\osg/observer_ptr(51) : while
 compiling
  class template member function 'osg::observer_ptrT
  osg::observer_ptrT::operator =(const osg::observer_ptrT )'
  4with
  4[
  4T=osg::Camera
  4]
  4D:\OpenSceneGraph\include\osgUtil/SceneView(523) : see
 reference
  to class template instantiation 'osg::observer_ptrT' being compiled
  4with
  4[
  4T=osg::Camera
  4]
  -Nick
 
 
  On Fri, Feb 19, 2010 at 5:19 PM, Trajce (Nick) Nikolov
  nikolov.tra...@gmail.com wrote:
 
  rebuilding ...
  -Nick
 
 
  On Fri, Feb 19, 2010 at 5:16 PM, Robert Osfield 
 robert.osfi...@gmail.com
  wrote:
 
  Hi Nick,
 
  I was just reviewing your the code you copied in your earlier message
  (below) and spotted that the observer_ptr was access a local mutex
  not the GlobalObserverMutex() as it should have been.  I've just fixed
  observer_ptr and am currently rebuilding.  Could you try the
  attached include/osg/observer_ptr.
 
  I do testing at my end if everything goes smoothly will check the
  change in.  I really don't know if it would fix the problem you are
  seeing, fingers crossed.
 
  Robert.
 
  On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov
  nikolov.tra...@gmail.com wrote:
   Hi Robert,
   I am getting a crash when cleaning up dynamic viewer
   osg::ref_ptrosgViewer::CompositeViewer viewer;
   ..
   viewer = 0;
  
  
  
 osg63-osgViewerd.dll!osg::observer_ptrosgViewer::ViewerBase::objectDeleted(void
   * obj=0x019c0ce4)  Line 115 + 0x6 bytes C++
 osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void *
   ptr=0x019c0ce4)  Line 68 + 0x20 bytes C++
 osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool
   signalUnreferened=true, bool signalDelete=true, bool doDelete=true)
Line
   311 C++
 osg63-osgd.dll!osg::Referenced::unref()  Line 196 C++
  
  
  
 KtIGLibOSGD.dll!osg::ref_ptrosgViewer::CompositeViewer::operator=(osgViewer::CompositeViewer
   * ptr=0x)  Line 57 C++
   KtIGLibOSGD.dll!KtIGLibOSG::destroy()  Line 72 C++
  
   down to
virtual void objectDeleted(void* obj)
   {
   T* ref_obj = static_castT*(obj);
   OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
 HERE-  if (ref_obj-referenceCount() == 0) _ptr = 0;
   }
   -Nick
  
  
   On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield
   robert.osfi...@gmail.com
   wrote:
  
   Hi All,
  
   To give you all a chance to thrash the OSG svn/trunk to an inch of
   it's life I'm headline for a few hours (to do my weekly long run).
   I'll be back at lunchtime, and if all looks well I'll go for making
   2.7.9 this afternoon (UK time).
  
   Thanks for all the testing,
   Robert.
   ___
   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 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 mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

I've just run the runexamples.bat and all the examples run cleanly so
I've now checked in my change to observer_ptr.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Michael Platings
Hi Robert,
with the latest files (including the observer_ptr you posted at 15:18)
everything is working fine for me now (Visual Studio 2008, Windows XP).

However, is observer_ptr's destructor thread safe? It looks like if the
target of _ptr were to be destroyed on another thread at the same time as
observer_ptr's destructor is running then there's nothing to stop the
observer_ptr calling removeObserver() on an invalid pointer.
How about:
~observer_ptr()
{
OpenThreads::ScopedLockOpenThreads::Mutex lock(*getObserverMutex());
if (_ptr) _ptr-removeObserver(this);
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

still crashing. I am building debug now

-Nick


On Fri, Feb 19, 2010 at 5:48 PM, Michael Platings mplati...@gmail.comwrote:

 Hi Robert,
 with the latest files (including the observer_ptr you posted at 15:18)
 everything is working fine for me now (Visual Studio 2008, Windows XP).

 However, is observer_ptr's destructor thread safe? It looks like if the
 target of _ptr were to be destroyed on another thread at the same time as
 observer_ptr's destructor is running then there's nothing to stop the
 observer_ptr calling removeObserver() on an invalid pointer.
 How about:
 ~observer_ptr()
 {
 OpenThreads::ScopedLockOpenThreads::Mutex lock(*getObserverMutex());
 if (_ptr) _ptr-removeObserver(this);
 }

 ___
 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] Migrating from 2.8.2 to 2.9.6

2010-02-19 Thread Garrett Cope
Ok,

When loading cow.osg I experience the same problems described above. Works fine 
when my app is compiled with osg 2.8.2, warning message and no visible geometry 
when using v. 2.9.6.

When viewing an .osg version of my test plane, there don't seem to be any 
special GL features being used. In fact, the files are nearly identical in each 
case except for the placement of the camera node. In the file that works, the 
camera is just under the root. In the other file, the camera is a level deeper 
and there is a 'Use Camera' line at the root. Pertinent sections shown below:


Code:
}
}
  }
  CameraView {
UniqueID CameraView_3
DataVariance DYNAMIC
name osg_main_view
nodeMask 0x
cullingActive TRUE
referenceFrame RELATIVE
position 0 400 0
attitude -0.707179 -0 -0 0.707035
fieldOfView 60
fieldOfViewMode VERTICAL
focalLength 0
  }
}




Code:
}
  CameraView {
UniqueID CameraView_3
DataVariance DYNAMIC
name osg_main_view
nodeMask 0x
cullingActive TRUE
referenceFrame RELATIVE
position 0 400 0
attitude -0.707179 -0 -0 0.707035
fieldOfView 60
fieldOfViewMode VERTICAL
focalLength 0
  }
}
  }
  Use CameraView_3
}



It seems strange that this would make any difference... Any ideas?

Thanks again,
Garrett

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Michael,

On Fri, Feb 19, 2010 at 3:48 PM, Michael Platings mplati...@gmail.com wrote:
 How about:
 ~observer_ptr()
 {
     OpenThreads::ScopedLockOpenThreads::Mutex lock(*getObserverMutex());
     if (_ptr) _ptr-removeObserver(this);
 }

Looks appropriate.  Now merged and checked into svn/trunk.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

On Fri, Feb 19, 2010 at 3:50 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 still crashing. I am building debug now

Is it still crashing with Michael's suggestion of add the mutex lock
to the observer_ptr destructor?  I've just checked in this fix.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

I have more input now after tracing this issue

virtual void objectDeleted(void* obj)
{
T* ref_obj = static_castT*(obj);

OpenThreads::ScopedLockOpenThreads::Mutex
lock(*getObserverMutex());
if (ref_obj-referenceCount() == 0) _ptr = 0;
}

ref_obj seam to be deleted here. It is not NULL and it has bunch of non
sense data in the members. Any idea?

-Nick


On Fri, Feb 19, 2010 at 6:07 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 3:50 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  still crashing. I am building debug now

 Is it still crashing with Michael's suggestion of add the mutex lock
 to the observer_ptr destructor?  I've just checked in this fix.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

On Fri, Feb 19, 2010 at 4:27 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 Hi Robert,
 I have more input now after tracing this issue
 virtual void objectDeleted(void* obj)
         {
             T* ref_obj = static_castT*(obj);
             OpenThreads::ScopedLockOpenThreads::Mutex
 lock(*getObserverMutex());
             if (ref_obj-referenceCount() == 0) _ptr = 0;
         }
 ref_obj seam to be deleted here. It is not NULL and it has bunch of non
 sense data in the members. Any idea?

Curious.  the objectDeleted(void*) method should be called on all the
observers of an object prior to the objects deletion - the delete is
called after the call to the observers.

You could try removing the if (ref_obj-referenceCouint()==0) part and
just leave the _ptr as they should be safe, the if statement is just
there for a belt and braces approach to the method and isn't critical.
 While there is might fix the crash it wouldn't actually explain it.

Is there any chance that your app has unloaded a dll before all the
data associated with it has been safely destructed?

Another little check you could do is check the value of obj compared
to _ptr, in theory they should be the same but if they aren't then we
know that something else is going wrong along the way.

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


Re: [osg-users] Migrating from 2.8.2 to 2.9.6

2010-02-19 Thread Paul Martz

Garrett Cope wrote:

When loading cow.osg I experience the same problems described above. Works fine 
when my app is compiled with osg 2.8.2, warning message and no visible geometry 
when using v. 2.9.6.


You're saying that if you run the 2.9.6 version of osgviewer:
  osgviewer cow.osg
...you are getting OpenGL invalid enum errors?

Try tunning osgviewer with your plane model.

If you are not getting the errors with the 2.9.6 version of osgviewer, 
but only with your app, then clearly this is a problem with your app and 
will be impossible for anyone on this list to debug it telepathically. 
You'll need to use an OpenGL capture tool to track down where the OpenGL 
error is coming from.

   -Paul

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

the dll is not undloaded. When I do

viewer = 0;
the viewer address and the one that gets down to objectDeleted(void* ptr)
are slightly different, means viewer.get() != ptr.

_ptr is not equal to obj

-Nick


On Fri, Feb 19, 2010 at 6:37 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 4:27 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  Hi Robert,
  I have more input now after tracing this issue
  virtual void objectDeleted(void* obj)
  {
  T* ref_obj = static_castT*(obj);
  OpenThreads::ScopedLockOpenThreads::Mutex
  lock(*getObserverMutex());
  if (ref_obj-referenceCount() == 0) _ptr = 0;
  }
  ref_obj seam to be deleted here. It is not NULL and it has bunch of non
  sense data in the members. Any idea?

 Curious.  the objectDeleted(void*) method should be called on all the
 observers of an object prior to the objects deletion - the delete is
 called after the call to the observers.

 You could try removing the if (ref_obj-referenceCouint()==0) part and
 just leave the _ptr as they should be safe, the if statement is just
 there for a belt and braces approach to the method and isn't critical.
  While there is might fix the crash it wouldn't actually explain it.

 Is there any chance that your app has unloaded a dll before all the
 data associated with it has been safely destructed?

 Another little check you could do is check the value of obj compared
 to _ptr, in theory they should be the same but if they aren't then we
 know that something else is going wrong along the way.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

On Fri, Feb 19, 2010 at 4:43 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 the dll is not undloaded. When I do
 viewer = 0;
 the viewer address and the one that gets down to objectDeleted(void* ptr)
 are slightly different, means viewer.get() != ptr.
 _ptr is not equal to obj

OK, things are getting odder... but I guess we uncover a clue soon.

What happens to the viewer, _ptr and obj values if you modify
osgviewer to construct a viewer on the heap and the delete it by
setting the ref_ptr to 0 or letting it go out of scope?

Testing whether the same problems with pointers mismatching when using
a the dll or straight app may give some more clues.

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


Re: [osg-users] line wrap delimiters in osgText

2010-02-19 Thread Terry Welsh
Good point.  Actually, I think the correct solution is more
complicated than either of us is thinking.  Right now the delimiters
are allowed to be either the first or last character on a line,
depending on what fits the best.  This is clearly wrong since none of
these characters should ever be the first on a line unless you're
typing gibberish.  I've never programmed a word processor, but I think
the correct solution is this:

1.  A new line should be started after a line's last hyphen or before
its last whitespace.
2.  If no suitable place to break a line is found, just start new line
after the last character that fits on the line.
3.  Whitespace should be removed from the beginning of the new line.

Now I'll see if I can program this.
--
Terry Welsh  /  mogumbo 'at' gmail.com
www.reallyslick.com  /  www.mogumbo.com


 Message: 3
 Date: Fri, 19 Feb 2010 07:18:42 +
 From: Robert Osfield robert.osfi...@gmail.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] line wrap delimiters in osgText
 Message-ID:
        7ffb8e9b1002182318j2c2760c9r334dd4b0f6008...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1

 Hi Terry,

 On Fri, Feb 19, 2010 at 12:48 AM, Terry Welsh mogu...@gmail.com wrote:
 In Text.cpp and Text3D.cpp, the current list of delimiters used to
 find the last character in a line is
 SPACE \n / , ; : .

 I propose instead using
 SPACE \n / -

 Everyone okay with this? ?As it is now you commonly see lines starting
 with periods that should accompany the word on the previous line.

 I haven't looked at the code but my guess is that it is trying to
 include the comma and fullstop on the same line, note that is looking
 for the last character on a line, not the first character on the next
 line.  If it's failing then perhaps it's one off somewhere.

 Robert.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

attached is the sample that crashes. Please let me know if crash for you as
well


-Nick


On Fri, Feb 19, 2010 at 7:10 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Fri, Feb 19, 2010 at 4:43 PM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  the dll is not undloaded. When I do
  viewer = 0;
  the viewer address and the one that gets down to objectDeleted(void* ptr)
  are slightly different, means viewer.get() != ptr.
  _ptr is not equal to obj

 OK, things are getting odder... but I guess we uncover a clue soon.

 What happens to the viewer, _ptr and obj values if you modify
 osgviewer to construct a viewer on the heap and the delete it by
 setting the ref_ptr to 0 or letting it go out of scope?

 Testing whether the same problems with pointers mismatching when using
 a the dll or straight app may give some more clues.

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

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This application is open source and may be redistributed and/or modified   
 * freely and without restriction, both in commericial and non commericial 
applications,
 * as long as this copyright notice is maintained.
 * 
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include osgDB/ReadFile
#include osgUtil/Optimizer
#include osg/CoordinateSystemNode

#include osg/Switch
#include osgText/Text

#include osgViewer/Viewer
#include osgViewer/CompositeViewer
#include osgViewer/ViewerEventHandlers

#include osgGA/TrackballManipulator
#include osgGA/FlightManipulator
#include osgGA/DriveManipulator
#include osgGA/KeySwitchMatrixManipulator
#include osgGA/StateSetManipulator
#include osgGA/AnimationPathManipulator
#include osgGA/TerrainManipulator
#include osgGA/SphericalManipulator

#include iostream

int main(int argc, char** argv)
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(argc,argv);


arguments.getApplicationUsage()-setApplicationName(arguments.getApplicationName());

arguments.getApplicationUsage()-setDescription(arguments.getApplicationName()+
 is the standard OpenSceneGraph example which loads and visualises 3d models.);

arguments.getApplicationUsage()-setCommandLineUsage(arguments.getApplicationName()+
 [options] filename ...);
arguments.getApplicationUsage()-addCommandLineOption(--image 
filename,Load an image and render it on a quad);
arguments.getApplicationUsage()-addCommandLineOption(--dem 
filename,Load an image/DEM and render it on a HeightField);
arguments.getApplicationUsage()-addCommandLineOption(--login url 
username password,Provide authentication information for http file 
access.);

{
osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer;



viewer-setThreadingModel(osgViewer::CompositeViewer::CullDrawThreadPerContext);


unsigned int helpType = 0;
if ((helpType = arguments.readHelpType()))
{
arguments.getApplicationUsage()-write(std::cout, 
helpType);
return 1;
}

// report any errors if they have occurred when parsing the 
program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(std::cout);
return 1;
}

if (arguments.argc()=1)
{

arguments.getApplicationUsage()-write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
}

std::string url, username, password;
while(arguments.read(--login,url, username, password))
{
if 
(!osgDB::Registry::instance()-getAuthenticationMap())
{

osgDB::Registry::instance()-setAuthenticationMap(new osgDB::AuthenticationMap);

osgDB::Registry::instance()-getAuthenticationMap()-addAuthenticationDetails(
url,
new 
osgDB::AuthenticationDetails(username, password)
);
}
}

// set up the camera manipulators.
{
osg::ref_ptrosgGA::KeySwitchMatrixManipulator 
keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;

keyswitchManipulator-addMatrixManipulator( '1', 
Trackball, new 

Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

 attached is the sample that crashes. Please let me know if crash for you as
 well

I've just tested you osgviewer.cpp and it doesn't crash for me, but..
some debugging that I added into my include/osg/observer_ptr reports a
mismatch of pointers.  When I run the standard osgviewer it doesn't
report any mismatched pointers so the error does look like they are
carried over linux just fine, even if the crash doesn't occur.

Here's my output:

Constructor ReaderWriterOSG2 - loaded OK
Constructor OSGReaderWriter - loaded OK
ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
ObserverPtr::objectDeleted(0x9a4250) _ptr and obj agree
ObserverPtr::objectDeleted(0x9a4250) _ptr and obj agree
*** Warning ObserverPtr::objectDeleted(0x92d0f8) _ptr and obj
disagree, _ptr=0x92cfb0
ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
ObserverPtr::objectDeleted(0x92d9d0) _ptr and obj agree


I've attached my modified observer_ptr.  Now that I have the error
report I'll start digging into why the pointers have got to a point
where they disagree, and which object it is.  In your own tests was it
the viewer pointer that looked at fault?

Robert.


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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
correct. The viewer pointer was missmatching
-Nick


On Fri, Feb 19, 2010 at 7:55 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

  attached is the sample that crashes. Please let me know if crash for you
 as
  well

 I've just tested you osgviewer.cpp and it doesn't crash for me, but..
 some debugging that I added into my include/osg/observer_ptr reports a
 mismatch of pointers.  When I run the standard osgviewer it doesn't
 report any mismatched pointers so the error does look like they are
 carried over linux just fine, even if the crash doesn't occur.

 Here's my output:

 Constructor ReaderWriterOSG2 - loaded OK
 Constructor OSGReaderWriter - loaded OK
 ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
 ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
 ObserverPtr::objectDeleted(0x92d200) _ptr and obj agree
 ObserverPtr::objectDeleted(0x9a4250) _ptr and obj agree
 ObserverPtr::objectDeleted(0x9a4250) _ptr and obj agree
 *** Warning ObserverPtr::objectDeleted(0x92d0f8) _ptr and obj
 disagree, _ptr=0x92cfb0
 ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
 ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
 ObserverPtr::objectDeleted(0x9364c0) _ptr and obj agree
 ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
 ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
 ObserverPtr::objectDeleted(0x936e50) _ptr and obj agree
 ObserverPtr::objectDeleted(0x92d9d0) _ptr and obj agree


 I've attached my modified observer_ptr.  Now that I have the error
 report I'll start digging into why the pointers have got to a point
 where they disagree, and which object it is.  In your own tests was it
 the viewer pointer that looked at fault?

 Robert.

 ___
 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] Creating a new AnimationPathManipulator.

2010-02-19 Thread Nick Schultz
Ok, i see what you are saying..  The reason I was changed that was because 
referenceTime was getting reset back to realtime in the call to viewer.frame() 
( more specifically, inside the Viewer::advance() function).  

To avoid this, I don't call viewer.frame(), I now have to:

double simTime = 0.0;
while( !viewer.done() )
{   
 viewer.getFrameStamp()-setReferenceTime(simTime);
 viewer.eventTraversal();
 viewer.updateTraversal();
 viewer.renderingTraversals();
 simTime += 1.0;
}

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





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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 5:59 PM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 correct. The viewer pointer was missmatching

I've been reviewing the observer_ptr code and it looks correct.
Added a mutex to the copy constructor looks appropriate, but this
isn't the issue we're up against. One thing that has occurred to be is
that one possible reason for the divergence of the pointer values is
multiple inheritance.  Both Viewer and CompositeViewer use multiple
inheritance though...

One odd thing about CompositeViewer is that has virtual inherits from
osg::Object, when ViewerBase already provides osg::Object.  I don't
know why it's like this, perhaps at one point in the past it was
required then a refactor of VIewer/CompositeViewer didn't correctly
pick up on this not being needed...  I will remove this extra
inheritance of osg::Object and see what happens.

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


[osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz
Hi Robert -- r11087 is currently broke for GL3 builds. I get errors of 
this form:


5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2039: 'notify' : is not 
a member of 'osg'
5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2039: 'NOTICE' : is not 
a member of 'osg'
5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2065: 'NOTICE' : 
undeclared identifier
5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C3861: 'notify': 
identifier not found


Fog.cpp, TexEnv.cpp, and ColorMatrix.cpp generate similar errors. Let me 
know if you need a complete list.

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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Robert Osfield
Hi Paul,

I need a complete list is am to fix them... :-)

Robert.

On Fri, Feb 19, 2010 at 6:39 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert -- r11087 is currently broke for GL3 builds. I get errors of this
 form:

 5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2039: 'notify' : is not a
 member of 'osg'
 5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2039: 'NOTICE' : is not a
 member of 'osg'
 5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C2065: 'NOTICE' : undeclared
 identifier
 5..\..\..\src\osg\TexEnvFilter.cpp(41) : error C3861: 'notify': identifier
 not found

 Fog.cpp, TexEnv.cpp, and ColorMatrix.cpp generate similar errors. Let me
 know if you need a complete list.
   -Paul
 ___
 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] svn trunk build broke

2010-02-19 Thread Robert Osfield
Hi Paul,

Is it simply that these .cpp's don't pull in include/osg/Notify any
more due to clean ups of the headers?

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


Re: [osg-users] [osgOcean] osgOcean with osgEarth

2010-02-19 Thread Chris Innanen
Okay, I'm seeing some decidedly weird results from mixing osgEarth and 
osgOcean. I've attached a picture link, but here's the text description...

I've cut the code back to creating an osgEarth globe but I'm not putting any 
map data into it. (If I do, I get the same results anyway.) This means that 
without osgOcean attached to the graph, I get a gray sphere as expected, the 
first image in the picture below.

If I turn on osgOcean, the sphere turns black but with a thin ocean-colored 
band that varies in diameter, from the outer edge of the globe to about 10% 
smaller (2nd image). The variation occurs only when I move the camera, and is 
random in appearance. It does not move with the sphere as I rotate the view - 
it is always centered on the middle of the sphere.

If I zoom in and tilt the camera so as to look along the surface of the globe, 
the ocean-colored band gets bigger (while still hopping about in diameter) and 
shows some of the expected reflective properties of the osgOcean surface (3rd 
image). Up very close, it becomes bands of blue and blue-green that I can see 
increase in complexity, adding more bands (3rd image).

And now the picture:
   http://nonsanity.com/x/osg-earth-ocean-probs.jpg

And now some code. First, the code that creates my main scene, including 
osgEarth, and the class constructor that creates the osgOcean. And portion of 
the code that made no change to the outcome when it was commented out has been 
removed in this example. (Such as the addition of map data.)


Code:

// Init the main Root Groups
m_pRoot  = new osg::Group;
m_pSceneRoot  = new osg::Group;
m_pRoot-addChild( m_pSceneRoot );
m_pUIRoot  = new osg::Group;
m_pRoot-addChild( m_pUIRoot );

// osgEarth
osgEarth::Map* map = new osgEarth::Map( osgEarth::Map::CSTYPE_GEOCENTRIC );
osgEarth::MapEngineProperties props;
m_pMapNode = new osgEarth::MapNode( map, props );
m_pSceneRoot-addChild( m_pMapNode );

// osgOcean
osg::Matrixd placerm;
osgEarthUtil::ObjectPlacer placer( GetMapNode() );
placer.createPlacerMatrix( 30.17400170, -85.75135240, 0, placerm );
//osg::Drawable* water = CreateQuad( osg::Vec3(0,0,0), 10, 10 );
//osg::Geode* ocean = new osg::Geode();
//ocean-addDrawable( water );
m_pOcean = new C3DOcean;
osg::MatrixTransform* mat = new osg::MatrixTransform();
mat-addChild( m_pOcean-GetRoot() );   // mat-addChild( ocean );
m_pSceneRoot-addChild( mat );





C3DOcean::C3DOcean()
{
osg::Vec2fwindDirection = osg::Vec2f( 1.0f, 1.0f );
floatwindx = 1.1f;
floatwindy = 1.1f;
floatwindSpeed = 12.f;
floatdepth = 1000.f;
floatreflectionDamping = 0.35f;
floatwaveScale = 1e-8;
boolisChoppy = true;
floatchoppyFactor = -2.5f;
floatcrestFoamHeight = 2.2f;
doubleoceanSurfaceHeight = 0.0f;
osg::Vec3fsunDir = - osg::Vec3f(-1056.89f, -771.886f, 1221.18f );
sunDir.normalize();

// Ocean Root
m_pOcean = new osg::Group;

// prep paths
// .. added pathnames here

// Sky Cubemap - used for SkyDome and for relfection/refraction mapping
m_pCubemap = C3DSkyDome::loadCubeMapTextures( sky_fair_cloudy );

// Ocean Surface
m_pOceanSurface = new osgOcean::FFTOceanSurface( 32, 256, 17, 
windDirection, windSpeed, depth, reflectionDamping, waveScale, isChoppy, 
choppyFactor, 10.f, 256 );  
m_pOceanSurface-setEnvironmentMap( m_pCubemap.get() );
m_pOceanSurface-setFoamBottomHeight( 2.2f );
m_pOceanSurface-setFoamTopHeight( 3.0f );
m_pOceanSurface-enableCrestFoam( false );
m_pOceanSurface-setLightColor( osg::Vec4( 105/255.0, 138/255.0, 174/255.0, 
0.0 ) );
m_pOceanSurface-enableEndlessOcean( false );

// Ocean Scene
m_pOceanScene = new osgOcean::OceanScene( m_pOceanSurface.get() );
m_pOceanScene-setLightID( 0  );
m_pOceanScene-enableReflections( true);
m_pOceanScene-enableRefractions( true );
m_pOceanScene-setCylinderSize( 1900.f, 4000.f );
m_pOceanScene-setAboveWaterFog( 0.0012f, osg::Vec4( 172/255.0, 224/255.0, 
251/255.0, 0.0 ) );
m_pOceanScene-setUnderwaterFog( 0.002f, osg::Vec4( 84/255.0, 135/255.0, 
172/255.0, 0.0 ) );
m_pOceanScene-setUnderwaterDiffuse( osg::Vec4( 84/255.0, 135/255.0, 
172/255.0, 0.0 ) );
m_pOceanScene-setUnderwaterAttenuation( osg::Vec3( 0.008f, 0.003f, 0.002f 
) );
m_pOceanScene-setSunDirection( sunDir );
m_pOceanScene-enableGodRays( true );
m_pOceanScene-enableSilt( true );
m_pOceanScene-enableUnderwaterDOF( false );
m_pOceanScene-enableDistortion( true );
m_pOceanScene-enableGlare( true );
m_pOceanScene-setGlareAttenuation( 0.8f );

// Create and add fake texture for use with nodes without any texture
// since the OceanScene default scene shader assumes that texture unit 
// 0 is used as a base texture map.
// * I've tried the code with this section both on and off - no difference *
osg::Image* image = new osg::Image;

Re: [osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz

Robert Osfield wrote:

Is it simply that these .cpp's don't pull in include/osg/Notify any
more due to clean ups of the headers?


It's only occurring in the GL3 build; GL1/2 builds fine. If it were just 
a header issue, I'd think it'd be the same for both builds.

   -Paul

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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 7:24 PM, Paul Martz pma...@skew-matrix.com wrote:
 Robert Osfield wrote:

 Is it simply that these .cpp's don't pull in include/osg/Notify any
 more due to clean ups of the headers?

 It's only occurring in the GL3 build; GL1/2 builds fine. If it were just a
 header issue, I'd think it'd be the same for both builds.

Thanks for the error file.  GL1/2 build fine because for the files
you've specified there is not notify usage in the GL1/2 paths, only in
the non GL1/2 paths.

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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 7:23 PM, Paul Martz pma...@skew-matrix.com wrote:
 Robert Osfield wrote:

 I need a complete list is am to fix them... :-)

 Downloading gl3.h from opengl.org would allow you to do your own build.

Please remember there is only one of me.  I do try and chase up lots
of different build combinations, and chase up various bugs but there
are only so many hours in the day.  I can't be responsible for
everything, I need help from all corners of the community.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
Hi Robert,

yes, osgcompositeviewer cow.osg crashes

-Nick


On Fri, Feb 19, 2010 at 8:10 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 In testing at my end I got the pointer mismatch occur when running and
 then exiting osgcompositeviewer cow.osg.  Does the crash happen for
 you in this example as well? If so we could use that as the base for
 further testing.

 Robert.
 ___
 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] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi Nick,

I've been contemplating the crash you have and the mismatch of
pointers, which is little doubt down to multiple inheritance causing
difference between the osg::Referenced location and the pointer to the
actual object (class T for the template).  This difference means that
casting the pointer the osg::Referenced to the class T will result in
an error, and the crash you are seeing is almost certainly down to
this.

Give that the _ptr is of class T then it should be safe to use this to
check for the referenceCount() so one fix would be just to use if
(_ptr-referencedCount()==0).   Given the role of objectDeleted() I
don't think it really required to double check, the pointer really
just can be reset.

Could you do an svn update to the new mods that I've made to
include/osg/observer_ptr and see if you're modified osgviewer and the
standard osgcompositeviewer crash.  I've attached the file.

I'm optimistic that this bug is now squished so I'll move on to other
build issues.  Fingers crossed you'll report back success :-)

Robert.


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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz

Robert Osfield wrote:

On Fri, Feb 19, 2010 at 7:23 PM, Paul Martz pma...@skew-matrix.com wrote:

Robert Osfield wrote:

I need a complete list is am to fix them... :-)

Downloading gl3.h from opengl.org would allow you to do your own build.


Please remember there is only one of me.  I do try and chase up lots
of different build combinations, and chase up various bugs but there
are only so many hours in the day.  I can't be responsible for
everything, I need help from all corners of the community.


I understand the need for community involvement when testing on other 
platforms if you don't own that particular piece of hardware, but this 
is clearly a different situation.


It took me about 5 minutes to download gl3.h and set up an automated GL3 
build for CDash on my second system. Regardless of your time 
constraints, you're just about to tag a release, so I'd think you would 
take the time to make sure you haven't broken the build.

   -Paul



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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Trajce (Nick) Nikolov
:) .. I like your enthusiasm .. Rebuilding

-Nick


On Fri, Feb 19, 2010 at 9:54 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 I've been contemplating the crash you have and the mismatch of
 pointers, which is little doubt down to multiple inheritance causing
 difference between the osg::Referenced location and the pointer to the
 actual object (class T for the template).  This difference means that
 casting the pointer the osg::Referenced to the class T will result in
 an error, and the crash you are seeing is almost certainly down to
 this.

 Give that the _ptr is of class T then it should be safe to use this to
 check for the referenceCount() so one fix would be just to use if
 (_ptr-referencedCount()==0).   Given the role of objectDeleted() I
 don't think it really required to double check, the pointer really
 just can be reset.

 Could you do an svn update to the new mods that I've made to
 include/osg/observer_ptr and see if you're modified osgviewer and the
 standard osgcompositeviewer crash.  I've attached the file.

 I'm optimistic that this bug is now squished so I'll move on to other
 build issues.  Fingers crossed you'll report back success :-)

 Robert.

 ___
 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] svn trunk build broke

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 7:55 PM, Paul Martz pma...@skew-matrix.com wrote:
 It took me about 5 minutes to download gl3.h and set up an automated GL3
 build for CDash on my second system. Regardless of your time constraints,
 you're just about to tag a release, so I'd think you would take the time to
 make sure you haven't broken the build.

I'm working my guts out trying to get things fixed.  Please take your
attitude somewhere useful.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] OSG Virtual Planets, the core of gvSIG3D.

2010-02-19 Thread Allen Saucier
Hi Rafa  Jordi,

Rafa, something you said triggered an old memory of mine: I must run the 
vcvarsall.bat file to setup the correct environment  for vs8 and for compiling 
from the command line.


 
 I only could guess that you opened the wrong Visual-Studio command line, so 
 the environment is not correctly configured. 


So, I found vcvarsall.bat; I set up my cmd tool to run this batch file every 
time I start a cmd tool; and then I re-ran ant;  EVERYTHING WORKED after that. 
:):)

I have attached my installation guide for your review and use if you would like 
to have it.  It is what I had to do to get osgvp to install and build under 
Windows XP 32-bit.

As for using eclipse, I have not installed it yet for Windows.  I would like to 
use NetBeans, though, for java development on windows and ubuntu.  Have you 
ever used NetBeans to develop java applications that are based on osgvp?

My next move is to start developing a simple java application that starts an 
osgvp window and displays a simple terrain file.


Thank you for your support.  I really appreciate it! :):)
Allen

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




Attachments: 
http://forum.openscenegraph.org//files/osgvp_windows_xp_32bit_install_889.txt


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


Re: [osg-users] Problem sharing statesets to more than one drawable

2010-02-19 Thread Justin Gondron

  It doesn't sound reasonable that the Collada loader has created one drawable 
 for all the geometry that shares a shader group across different high-level 
 objects, unless it and you can be sure that you never need to manipulate the 
 objects position, etc. seperately. On the other hand, it is entirely 
 reasonable that the loader created one StateSet for that shader group, 
 sharing the StateSet between all the drawables containing geometry that uses 
 the shader group. If you're making changes to a StateSet that's used by one 
 of these drawables, you'll see it in all the others that use it. If you're 
 using getOrCreateStateSet to get a state set from one of these drawables and 
 then bang on it, you're changing the shared state set.
 
 

You're absolutely right.  My problem is an assumption that I made after I 
initially experimented with binding a stateset to a drawable.  At the time I 
just used getOrCreateStateSet after finding the drawable, then modified it.  I 
mistakenly thought I was pointing to a single drawable, since it seemed to 
impact them all, but I realize now I was modifying the stateset that was 
already shared between the drawables.  Based on this assumption, when I wrote 
my node visitor to find a drawable, I used the logic that I could stop 
traversing as soon as I found the drawable, since it referenced all of the 
faces associated with a shader group.  This worked ok for a while, but when I 
changed the code to start sharing statesets and started using setStateSet, I 
was really only setting the SS for a single drawable when I assumed I was 
setting it for all.

So I suppose my choices are to a) continue to just find the one drawable and 
modify the stateset that's already applied to it using getOrCreateStateSet(), 
or b) just search for all of the drawables with that name and use setStateSet() 
to apply the stateset we create.  

The problem with the first method is that it assumes whatever plugin we use to 
load the geometry is going to create a shared stateset for us automagically.  
We are fairly set on using collada, but I think I'm going to go with option B 
to be safe.  

In any case, I appreciate the response.  It has helped clear up what was really 
happening.

Thanks!

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





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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz

Robert Osfield wrote:

On Fri, Feb 19, 2010 at 7:55 PM, Paul Martz pma...@skew-matrix.com wrote:

It took me about 5 minutes to download gl3.h and set up an automated GL3
build for CDash on my second system. Regardless of your time constraints,
you're just about to tag a release, so I'd think you would take the time to
make sure you haven't broken the build.


I'm working my guts out trying to get things fixed.  Please take your
attitude somewhere useful.


I reject your assertion that I'm out of line. If you were an employee at 
any company I've worked at in the past, and were about to tag a release 
without testing the build, you'd be cited for poor QA.


You asked for the errors; I have them to you and told you how you could 
get them yourself in the future. I'm trying to help you produce a higher 
quality OSG.


If you expect people to test your code changes, you might want to think 
about being more polite to those of us who help out. We're busy too.

   -Paul


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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Robert Osfield
On Fri, Feb 19, 2010 at 9:09 PM, Paul Martz pma...@skew-matrix.com wrote:
 I reject your assertion that I'm out of line. If you were an employee at any
 company I've worked at in the past, and were about to tag a release without
 testing the build, you'd be cited for poor QA.

Right back at you Paul.  I'm not the only one responsible for the OSG,
the whole community is.  This is why I ask the community for help with
testing.


 You asked for the errors; I have them to you and told you how you could get
 them yourself in the future. I'm trying to help you produce a higher quality
 OSG.

Well the errors are great.  But... how's about actually trying to
produce some fixes as well.  This is what others have been helping out
with.

 If you expect people to test your code changes, you might want to think
 about being more polite to those of us who help out. We're busy too.

Geez, I'm polite to ones that are polite to me.  If you give me
attitude and I've working my guts out then you are going to get
attitude back.  You attitude is well out of order.

FYI, I have dedicated almost all of my time in the last 2 and half
months to purely unpaid OSG work.  I do this for the greater good of
the software.  Almost all the work I've been doing has been able
debugging and fixing problems that members of the community have come
across.  A great deal of work also goes into do proper review of
submissions.

All this work is unpaid.  I don't expect pay, I do it cause I love
working on the OSG and working with members of the community.  What
makes it shitty is when end users like yourself come at me an attidude
that I'm not working hard enough.

I find your attitude is corrosive.  I've worked hard today and really
didn't need a downer.  THANKS PAUL.

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


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Robert Osfield
Hi All,

I've just done builds under GLES1 and GLES2, had to make a few build
fixes, these are all now checked in.  It's clearly too late in the day
now to attempt a release, and all the changes today need build and
runtime testing too.

So while I take a well earned rest, you've got no excuses not to keep
pounding the build and runtime for a bit longer :-)

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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Jean-Sébastien Guay
I hate being the one to get between you two, but I think this is getting 
out of hand. As is often the case in these heated arguments, you're both 
right, and you're both wrong.


Paul, finding which header is missing from the places where you get the 
errors would probably not be too hard.


Robert, getting a header and trying a GL3 build would probably not be 
too hard.


Paul, Robert has been troubleshooting lots of things today, most of 
which are threading problems which are notoriously hard to wrap your 
mind around, and so probably has lots on his mind right now (the mental 
call stack is getting deep ;-) ). Plus, it's around 9:45 where he is so 
he's had a long day behind him.


Robert, Paul is trying to help in his own way and trying to help you 
help yourself by telling you that getting a GL3 build going is easy, 
which is something you might say to other people on the list if the 
places were reversed (Have you tried running in a debugger, we're not 
here to debug your code, etc.).


Sorry but the last replies have not been constructive. I think the best 
thing to do is to drop the issue for now, go back to the technical 
issues, and remember that you're both working towards the same goal :-) 
And you have been for many years now... Longer than I've been here!


I hope by telling you not to flame each other I won't get flamed myself :-)

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk for OpenThread/OpenSceneGraph

2010-02-19 Thread Torben Dannhauer
Hi Robert,

compiling under Vista32, VS2005 SP1 works.

But I get some warnings, e.g. 
- CullSettings.cpp Line 31: Warnung osg::CullSettings::VariablesMask in 
unsigned int, signed/unsigned-Konflikt. 
- graph_array.h line 106: 
'triangle_stripper::detail::graph_arraynodetype::node': Assignmentoperator 
could not be generated
- policy.h line 41: 'triangle_stripper::detail::policy': Assignmentoperator 
could not be generated

Testing follows tomorrow.

Thank you!

Cheers,
Torben

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





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


[osg-users] newbie texture question

2010-02-19 Thread David Cofer
Hi,

I am new to OSG and I am attempting to port some work that was done in directX 
over to OSG. I am using some of the basic geometric objects like osg::box and 
osg::sphere. I got those working like I wanted, but when I tried to add texture 
mapping to them the results are very different than what I got in DirectX. For 
example, by default in directX when I mapped a texture  to a box then each face 
got a full copy of the texture. However, when I map the same texture to the box 
in osg I get some weird stretched lines over the faces. 

Do the standard geometric objects not have texture coordinates already defined, 
or am I doing something simple wrong? I have listed a code snippet below. I 
have also tried using all of the different texture modes, and none of them 
really worked. 
Do I have to set the texture coords up manually? Seems to defeat the purpose of 
having simple objects predefined if I have to do a bunch of manual texture 
corrdinate code for each one.

I have attached an image example showing the difference between the directx and 
osg versions.
  

Code:

osg::ref_ptrosg::MatrixTransform gNode = new 
osg::MatrixTransform(osg::Matrix::translate(osg::Vec3(0, 0,0)));
osg::ref_ptrosg::ShapeDrawable boxDrawable = new 
osg::ShapeDrawable(new osg::Box(osg::Vec3(0,0,0), 10, 10, 10));
osg::ref_ptrosg::Geode box = new osg::Geode;
box-addDrawable(boxDrawable.get());
gNode-addChild(box.get());
root-addChild(gNode.get());
osg::ref_ptrosg::Image image = osgDB::readImageFile(gravel.bmp);
osg::StateSet* state = box-getOrCreateStateSet();
state-setTextureAttributeAndModes(0, new osg::Texture2D(image.get())); 




Thank you!

Cheers,
David

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




Attachments: 
http://forum.openscenegraph.org//files/textureexamples_200.jpg


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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz

Jean-Sébastien Guay wrote:
Paul, finding which header is missing from the places where you get the 
errors would probably not be too hard.


I often do provide fixes, but I'm under the gun to get demos out the 
door in a few days. Also, the general rule for most software development 
projects is: you break it, you fix it.


Robert, keep in mind that words account for only a small percentage of 
communication, which makes it easy to read attitude into someone's 
text-only post, where none actually exists. My posts were brief, but 
hardly deserving of your replies.

   -Paul


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


[osg-users] setDataVariance question

2010-02-19 Thread Guy Volckaert
Hi,

I'm little confused about when it's appropriate or even necessary to call 
setDataVariance(DYNAMIC) - assuming we are not running in SingleThreaded mode. 

For example:

1) If I have a switch node and want to change its state in the update or event 
sequence (i.e during runtime), does the data variance need to be DYNAMIC? If I 
look at the _switch node in osgViewer::StatsHandler, it is not set to DYNAMIC 
although it is changed dynamically during runtime.

2) If I add a child node to a simple Group node (again during runtime), does 
the Group node need to be DYNAMIC? 

3) If I have a my target has a MatrixTranform node and I decide to update its 
matrix, does it need to be DYNAMIC? 


Regards,

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





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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Paul Martz

Robert Osfield wrote:

Thanks for the error file.  GL1/2 build fine because for the files
you've specified there is not notify usage in the GL1/2 paths, only in
the non GL1/2 paths.


Ah! Makes sense.

r11097 has fixes the vast majority of the errors. There is only one 
dangler at this point:


7ObjectWrapper.cpp
7..\..\..\src\osgDB\ObjectWrapper.cpp(352) : error C2065: 
'GL_PERSPECTIVE_CORRECTION_HINT' : undeclared identifier


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


Re: [osg-users] setDataVariance question

2010-02-19 Thread Paul Martz

Guy Volckaert wrote:

Hi,

I'm little confused about when it's appropriate or even necessary to call setDataVariance(DYNAMIC) - assuming we are not running in SingleThreaded mode. 


You should read through the archives, as this has been discussed quite a 
bit. In summary, DYNAMIC keeps things thread-safe in osgViewer 
multithreaded modes, and keeps the Optimizer from optimizing away your 
nodes.



1) If I have a switch node and want to change its state in the update or event 
sequence (i.e during runtime), does the data variance need to be DYNAMIC?


No. Switch nodes aren't part of the render graph, they're processed 
during cull. This means you can alter the Switch during event/update and 
rest assured that no draw thread is trying to access your Switch.


2) If I add a child node to a simple Group node (again during runtime), does the Group node need to be DYNAMIC? 


Same as for Switch.

3) If I have a my target has a MatrixTranform node and I decide to update its matrix, does it need to be DYNAMIC? 


I don't think so, because if I remember correctly the CullVisitor stores 
only the accumulated transformation in the render graph, which means 
that after cull is complete, draw never references the MatrixTransform 
and you're free to change it. You should look at the CullVisitor code to 
be sure.


In all three of these cases, you might want set the DataVariance to 
DYNAMIC anyway, or at least add a comment saying it's not necessary and 
why. This might make it easier for future developers maintaining your code.

   -Paul

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


Re: [osg-users] svn trunk build broke

2010-02-19 Thread Jean-Sébastien Guay

Hi Paul,

Paul, finding which header is missing from the places where you get 
the errors would probably not be too hard.


I often do provide fixes, but I'm under the gun to get demos out the 
door in a few days. 


And Robert's under the gun (perhaps his own gun) to get a dev release 
out the door in a few days too. So suggesting he set up something new at 
this point in time was the same as him suggesting you fix the code 
yourself :-)


Also, the general rule for most software development 
projects is: you break it, you fix it.


I understand where you're coming from, but the fact is that when there 
are multiple code paths (and even more so when there are code paths 
determined at configure-time with #defines) it becomes hard and 
time-consuming to test each and every combination. I think it's 
reasonable for Robert to rely on the community for some of this, 
especially for configurations he doesn't use day to day.


Just look at how many times I've submitted Windows build fixes in the 
past 3 years - I cut my teeth in OSG submissions on that stuff! For now, 
I see GL3 as the same thing - OSG's primary developer doesn't use the 
configuration (he could, I agree, but that's not the point), so it's up 
to others to test that it builds and runs for now.


Although I also agree with your point that getting an automated build 
going for each configuration would be easy too, but crunch time was 
probably not the right time to suggest this...


In effect, both of you were saying I can't fix this, I'm too busy with 
other things, you should fix it. And one of you had actually broken it, 
but the other had the errors right there in front of them. So you both 
could have fixed it. That's all I wanted to emphasize.


Robert, keep in mind that words account for only a small percentage of 
communication, which makes it easy to read attitude into someone's 
text-only post, where none actually exists.


That's so true. Most flame wars start because one poster reads more into 
the words than what was actually there, and then things escalate.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org