Re: [osg-users] how can I ignore the UpdateCallback

2009-10-16 Thread Himar Carmona
Hi,

Specifically, AnimationPathCallback has a setPause method.

More generally, you can control which nodes OSG updates (i.e. visits
during an updateTraversal) using node masks. Look at the methods
osg::NodeVisitor::setTraversalMask and validNodeMask for an explanation
about how it works. In short, visitors have a bit mask (defaults to
0x) and nodes have a bit mask (defaults to 0x). If the
bitwise and operation between them gives a result other than 0, the node
will be visited. If the result is 0, the node will not be visited. (Really
the node wil be visited but the update callback will not be called). Node
visitors has also a Node mask override that allow you to override the node
mask to force the node to be visited ignoring its mask.

 Hope this helps.
Himar.
2009/10/15 Paul Martz pma...@skew-matrix.com

 AnimationPath runs off of sim time, so if you mod your app to not increment
 sim time, then the animation will not play.

 Paul Martz
 Skew Matrix Software LLC
 _http://www.skew-matrix.com_ http://www.skew-matrix.com/
 +1 303 859 9466




 Martin Großer wrote:

 Hello,

 my short question is. When I have a Node with an UpdateCallback function
 (maybe a animation), can I skip this function?
 Also my Problem is, I export a graph from 3D Max with an animation. The
 animation is in a update callback function like the following lines:

 [...]
 MatrixTransform {
DataVariance DYNAMIC
name Kugel01
nodeMask 0xff
cullingActive TRUE
UpdateCallbacks {
  AnimationPathCallback {
DataVariance DYNAMIC
pivotPoint 0 0 0
timeOffset 0
timeMultiplier 1.0
AnimationPath {
  DataVariance DYNAMIC
  LoopMode LOOP
  ControlPoints {
 [...]

 But I would not start the animation right at the beginning. I think the
 viewer calls the update function (update visitor) every frame. I want to
 start manually the animation. There are an easy way?

 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how can I ignore the UpdateCallback

2009-10-16 Thread Martin Großer

Hello,

Paul, when I stop the sim time then stop all animation. Or is it a wrong 
guess?


Himar, I tried to change the NodeMask and the viewer did not draw the 
node. I think all functions were ignored, but I would ignore the update 
callback only.


I have an idea. Can I Copy the update callback to event callback and 
after this I remove the udate callback. Now I can define a event to 
run the event callback?


Cheers, Martin

Am 16.10.2009 08:59, schrieb Himar Carmona:

Hi,
Specifically, AnimationPathCallback has a setPause method.
More generally, you can control which nodes OSG updates (i.e. 
visits during an updateTraversal) using node masks. Look at the 
methods osg::NodeVisitor::setTraversalMask and validNodeMask for an 
explanation about how it works. In short, visitors have a bit 
mask (defaults to 0x) and nodes have a bit mask (defaults to 
0x). If the bitwise and operation between them gives a 
result other than 0, the node will be visited. If the result is 0, the 
node will not be visited. (Really the node wil be visited but the 
update callback will not be called). Node visitors has also a Node 
mask override that allow you to override the node mask to force the 
node to be visited ignoring its mask.

 Hope this helps.
Himar.
2009/10/15 Paul Martz pma...@skew-matrix.com 
mailto:pma...@skew-matrix.com


AnimationPath runs off of sim time, so if you mod your app to not
increment sim time, then the animation will not play.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com_/
http://www.skew-matrix.com/
+1 303 859 9466




Martin Großer wrote:

Hello,

my short question is. When I have a Node with an
UpdateCallback function (maybe a animation), can I skip this
function?
Also my Problem is, I export a graph from 3D Max with an
animation. The animation is in a update callback function like
the following lines:

[...]
MatrixTransform {
   DataVariance DYNAMIC
   name Kugel01
   nodeMask 0xff
   cullingActive TRUE
   UpdateCallbacks {
 AnimationPathCallback {
   DataVariance DYNAMIC
   pivotPoint 0 0 0
   timeOffset 0
   timeMultiplier 1.0
   AnimationPath {
 DataVariance DYNAMIC
 LoopMode LOOP
 ControlPoints {
[...]

But I would not start the animation right at the beginning. I
think the viewer calls the update function (update visitor)
every frame. I want to start manually the animation. There are
an easy way?

Cheers,

Martin

___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] How to access Material Palette of flt file at runtime?

2009-10-16 Thread Roger Rawls
Thank you,Gordon.

Seems, I need to change my design.

Originally, I just want to set plant leave's color,ambient and diffuse value in 
palette, and change one set to another at runtime.

for now, I don't know if I need to write them in an xml file. If I do, then 
modeling is an troublesome thing, since I would have to manually write down 
every color set.

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





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


Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-16 Thread Sebastien Nerig
Hi Bryan,

ok thx for your answer (even if I do not understand the 1st part of your 
message?)
I did some research on the forum before posting, but maybe it wasn't enought.

Thank you!

Cheers,
Sebastien

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





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


[osg-users] [osgOcean] Member var initialization bug in Cylinder

2009-10-16 Thread Smelik, R.M. (Ruben)
Dear all,
 
Here is a simple fix for an error in the Cylinder class of the current svn 
trunk version of osgOcean. Yesterday's revision 156 introduced member vars for 
the Cylinder (_radius, _steps, etc.) but these were not initialized in the 
Cylinder constructor, resulting in uninitialized vars being passed to the 
build() method, resulting in a bad_alloc crash :-)
 
Kind regards,
 
Ruben Smelik
 
This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
/*
* This source file is part of the osgOcean library
* 
* Copyright (C) 2009 Kim Bale
* Copyright (C) 2009 The University of Hull, UK
* 
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free 
Software
* Foundation; either version 3 of the License, or (at your option) any later
* version.

* This program 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. See the GNU Lesser General Public License for more 
details.
* http://www.gnu.org/copyleft/lesser.txt.
*/

#include osgOcean/Cylinder

using namespace osgOcean;

Cylinder::Cylinder( void )
{
}

Cylinder::Cylinder( float radius, float height, unsigned int steps, bool isTop, 
bool isBottom  ) :
_radius(radius),
_height(height),
_steps(steps), 
_isTop(isTop),
_isBottom(isBottom)
{
build();
}

Cylinder::Cylinder( const Cylinder copy, const osg::CopyOp copyop ):
osg::Geometry   (copy, copyop),
_radius (copy._radius),
_height (copy._height),
_steps  (copy._steps),
_isTop  (copy._isTop),
_isBottom   (copy._isBottom)
{
}

Cylinder::~Cylinder(void)
{
}

void Cylinder::build( float radius, float height, unsigned int steps, bool top, 
bool bottom )
{
_radius = radius;
_height = height;
_steps = steps;
_isTop = top;
_isBottom = bottom;

build();
}

void Cylinder::build( void )
{
// clear primitives if there are any
if(getNumPrimitiveSets()  0)
{
removePrimitiveSet(0,getNumPrimitiveSets());
dirtyDisplayList();
}

const float twoPI = osg::PI * 2.f;
const float angleInc = twoPI / (float)_steps;

osg::Vec3Array* vertices = new osg::Vec3Array();

vertices-push_back( osg::Vec3f() );// bottom centre

for ( float angle = 0.f; angle = twoPI; angle += angleInc )
{
float x1 = _radius * cos(angle);
float y1 = _radius * sin(angle);

vertices-push_back( osg::Vec3( x1, y1, 0.f ) );
vertices-push_back( osg::Vec3( x1, y1, _height ) );
}

vertices-push_back( osg::Vec3f(0.f, 0.f, _height) );   // top centre

osg::DrawElementsUInt* indices = 
new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLE_STRIP, 0 
);

for(unsigned int c = 1; c  _steps*2+1; c += 2 )
{   
indices-push_back( c   );
indices-push_back( c+1 );
}

indices-push_back(1);
indices-push_back(2);

addPrimitiveSet( indices );

if( _isBottom )
{
osg::DrawElementsUInt* fanIndices = 
new osg::DrawElementsUInt( 
osg::PrimitiveSet::TRIANGLE_FAN, 0 );

fanIndices-push_back( 0 );

for(int c = _steps*2-1; c = 1; c -= 2 )
{   
fanIndices-push_back( c );
}

fanIndices-push_back( _steps*2-1 );

addPrimitiveSet( fanIndices );
}

if( _isTop )
{
osg::DrawElementsUInt* fanIndices = 
new osg::DrawElementsUInt( 
osg::PrimitiveSet::TRIANGLE_FAN, 0 );

fanIndices-push_back( vertices-size()-1 );

for(int c = _steps*2; c = 1; c -= 2 )
{   
fanIndices-push_back( c );
}

fanIndices-push_back( _steps*2 );

addPrimitiveSet( fanIndices );
}

_colorArray = new osg::Vec4Array(1);
(*_colorArray)[0]=osg::Vec4( 0.f, 0.f, 0.f, 1.0f );

setVertexArray( vertices );
setColorArray( _colorArray.get() );
setColorBinding( osg::Geometry::BIND_OVERALL );
setUseDisplayList(true);
}

void Cylinder::setColor(const osg::Vec4f color)
{
if(getColorArray())
{
osg::Vec4Array* colors = static_castosg::Vec4Array*( 
getColorArray() );
(*_colorArray)[0] = color;
setColorBinding( osg::Geometry::BIND_OVERALL );
dirtyDisplayList();
}
}
/*
* This source file is part of the osgOcean library
* 
* Copyright (C) 2009 Kim Bale
* Copyright (C) 2009 The University 

Re: [osg-users] [osgOcean] Member var initialization bug in Cylinder

2009-10-16 Thread Kim Bale
Thanks Ruben,

I was programming under the influence of a couple of beers last night,
clearly that was not a good idea :)

Regards,

Kim.


2009/10/16 Smelik, R.M. (Ruben) ruben.sme...@tno.nl:
 Dear all,

 Here is a simple fix for an error in the Cylinder class of the current svn
 trunk version of osgOcean. Yesterday's revision 156 introduced member vars
 for the Cylinder (_radius, _steps, etc.) but these were not initialized in
 the Cylinder constructor, resulting in uninitialized vars being passed to
 the build() method, resulting in a bad_alloc crash :-)

 Kind regards,

 Ruben Smelik


 This e-mail and its contents are subject to the DISCLAIMER at
 http://www.tno.nl/disclaimer/email.html

 ___
 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] [osgOcean] Member var initialization bug in Cylinder

2009-10-16 Thread Kim Bale
I've just updated the trunk with the fix.

Cheers,

Kim.


2009/10/16 Kim Bale kcb...@googlemail.com:
 Thanks Ruben,

 I was programming under the influence of a couple of beers last night,
 clearly that was not a good idea :)

 Regards,

 Kim.


 2009/10/16 Smelik, R.M. (Ruben) ruben.sme...@tno.nl:
 Dear all,

 Here is a simple fix for an error in the Cylinder class of the current svn
 trunk version of osgOcean. Yesterday's revision 156 introduced member vars
 for the Cylinder (_radius, _steps, etc.) but these were not initialized in
 the Cylinder constructor, resulting in uninitialized vars being passed to
 the build() method, resulting in a bad_alloc crash :-)

 Kind regards,

 Ruben Smelik


 This e-mail and its contents are subject to the DISCLAIMER at
 http://www.tno.nl/disclaimer/email.html

 ___
 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] Freetype and JPG plugins problems

2009-10-16 Thread Alessandro Terenzi
Hi,
yesterday I downloaded the last dev release of osg (2.9.6) and now I'm 
experiencing problems with some plugins.

My scenario is simple: just load a .osg file with osgviewer.exe. The dir that 
contains my osgviewer also contains all osg DLLs and 3rd parties DLLs, the 
models and textures dirs and then all the plugins (I tried to put the plugins 
both in the osgPlugins-2.9.6 dir and in the same level of my osgviewer.exe)

In all cases it looks like that every required plugin is successfully found but:

1) if I put the plugins in osgPlugins-2.9.6, then the loading of osgdb_osg.dll 
fails, don't know why...

2) if I put the plugins in the same dir of osgviewer.exe, then loading of 
osgdb_osg.dll is fine, but loading freetype and JPG plugins fails (but for 
example RGB plugin is ok too). Regarding this case, looking at the generated 
'manifests', I suspect that the problem could be in the different versions used 
by what I build (CRT's minor number 4053) and 3rd parties binaries (CRT's minor 
number 762)...

Any suggestion or ideas? Should I re-built 3rd Parties binaries? (I hope not)

Regarding my building environment: I built everything (excluding 3rd parties 
binaries) on Vista 32 bit and VC++ 2005 Express Edition SP1 (regarding 3rd 
parties binaries I downloaded the ones built from VS80 SP1). By the way, 
running the application on the building machine works fine in both the 
scenarios.

Thank you! Kind regards,
Alessandro

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





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


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-16 Thread Cedric Pinson
Hi pp,
What is the function setupAnimtkNode ? and which version of
OpenSceneGraph are you using ?


Cheers,
Cedric

-- 
+33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Fri, 2009-10-16 at 11:31 +0200, p...@graphics.cs.uni-sb.de wrote:
 Please, anybody, point me to a piece on informationt, thx.
 
 I try to write osgAnimation Callbacks into an osg file but don't get it to 
 work.
 All available osgAnimation examples create executables, but no osg files. 
 
 When I use osgDB::writeNodeFile( *someScene , someScene.osg ) ;
 
 instead of creating a viewer, the code block between UpdateCallbacks 
 parenthesis stays empty in the resulting osg file, but this is where I 
 would expect keyframe and channel data. The Blender Exporter is also not 
 helpful, as it uses its own mechanism to write out osg files through 
 Python.
 
 Can anybody explain / post / create an example that writes a simple 
 osgAnimation into an osg file, please or point to information on that ?
 
 
 Problem reconstruction :
 
 osgAnimation Example osganimationnode, exchange the main proc. Instead 
 of creating a viewer write out a file, as this.
 
 int main( int , char** )
 {
 osg::ref_ptr osg::Group  root = new osg::Group ;
 root-setInitialBound(osg::BoundingSphere(osg::Vec3(10,0,10), 30));
 root-addChild(createAxis());
 
 osg::MatrixTransform* node = setupAnimtkNode();
 root-addChild(node);
 
 if ( !root.valid() )
 osg::notify( osg::FATAL )  Failed in createSceneGraph() !  
 std::endl ;
 bool arg = false;
 
 bool  result = osgDB::writeObjectFile( * ( root.get() ) , 
 animNode.osg ) ;
 if ( !result )
 osg::notify( osg::FATAL )  Failed in osgDB::writeNodeFile() 
 !  std::endl ;
 }
 
 
 
 Cheers, searching for the Pivot of my Soul, PP !!!
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread Thibault Genessay
Hi Alessandro,

On Fri, Oct 16, 2009 at 11:30 AM, Alessandro Terenzi
a.tere...@gmail.com wrote:
 1) if I put the plugins in osgPlugins-2.9.6, then the loading of 
 osgdb_osg.dll fails, don't know why...

Have you tried to set OSG_NOTIFY_LEVEL to DEBUG_INFO to check the
paths the OSG tries before it gives up ?

 2) if I put the plugins in the same dir of osgviewer.exe, then loading of 
 osgdb_osg.dll is fine, but loading freetype and JPG plugins fails (but for 
 example RGB plugin is ok too). Regarding this case, looking at the generated 
 'manifests', I suspect that the problem could be in the different versions 
 used by what I build (CRT's minor number 4053) and 3rd parties binaries 
 (CRT's minor number 762)...

You might try to:
- install the redistributables for visual c++ 2005 SP1 on the deployment machine
- use the dependency walker tool on the target machine and open the
osgdb_png.dll and osgdb_freetype.dll files. Check if there are any
unresolved dependencies there.
- install other redistributables as well, if somehow the 3rd party
package references more than a single CRT, e.g. vs80, vs90, vs90 SP1.

The RGB plugin works since it has no external dependency. Other
plugins with pure C dependencies will work as well. The problem is
always with the extra c++ DLLs required by c++ DLLs you did not build
by yourself.

Hope you manage to get it running without having to recompile your
dependencies by yourself - which is time consuming but quite less
frustrating w.r.t the problems you have.

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


Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-16 Thread Chris Denham
The trick, if I can call it that, is to perform the leak check in the 
destructor of the last destroyed object. Works for me!
You just need to make sure your global heap check object is created before OSG 
gets to make its evil singletons ;-) . e.g.


Code:

struct TheEnd 
{ 
~TheEnd() { CheckForLeaks(); }
};

TheEnd theEnd;

int main(int argc, char* argv[])
{ 
osgViewer::Viewer viewer;

viewer.run();
return 0;
}




Cheers,
Chris

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





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


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread Alessandro Terenzi
Thank you for your help,
I already tryed to set the notify level to debug and, as far as I understand, 
plugins are always discovered but the only error message I see is 
DynamicLibrary::fail loading ... no further detail is provided.

I just had to try to install the redistributables for Visual c++ 2005 SP1 on 
the deployment machine (even though I was providing my application with a 
manifest and corrensponding CRT), so I tried it but again this not solved the 
problem...actually on every deployment machine the installation of the 
redistributable looks not so 'polite' because it strarts but doesn't display a 
completion message, so I'm not so sure about a successful installation...

Tried also the dependency walker tool on the target machine, and some DLL are 
not found but they are the same as the RGB plugin that works. The missing DLL 
is DWMAPI.DLL, don't know what it is for...

Don't know if this could relate to this problem, but in CMake I see the 
USE_3RDPARTY_BIN set to ON by default...what does it mean?

Thank you again...
Kind regards,
Alessandro

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





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


[osg-users] [patch] PThread.c++ creation error, lower stack size limit

2009-10-16 Thread David Fries
This was against 2.8.1, but I see the trunk is identical.
Any issues with using PTHREAD_STACK_MIN?
http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_getstacksize.html


I was trying to create a lot of threads under 32 bit Linux, but could
only create 376, then the program would hang.
376 * 8MB stack per thread = 3008 MB
The stack size allocated per thread blew the process address stack.
To get more threads you have to specify a smaller per thread stack,
but while the Thread::start says it will limit the stack size to the
smallest allowable stack size, it won't let it be smaller than the
default.  I included the limits.h header to use PTHREAD_STACK_MIN as
the minimum stack size.

As for the deadlock, if the pthread_create failed, the new thread
doesn't exist and doesn't call threadStartedBlock.release(), so the
existing thread deadlocks on threadStartedBlock.block().  Only block
if the thread was started.

-- 
David Fries da...@fries.net
http://fries.net/~david/ (PGP encryption key available)


Index: src/OpenThreads/pthreads/PThread.c++
===
--- src/OpenThreads/pthreads/PThread.c++(revision 10273)
+++ src/OpenThreads/pthreads/PThread.c++(working copy)
@@ -21,6 +21,7 @@
 #include sys/types.h
 #include unistd.h
 #include pthread.h
+#include limits.h
 
 #if defined __linux || defined __sun || defined __APPLE__
 #include string.h
@@ -588,30 +589,29 @@
 
 PThreadPrivateData *pd = static_castPThreadPrivateData * (_prvData);
 
-size_t defaultStackSize;
-pthread_attr_getstacksize( thread_attr, defaultStackSize);
-if(status != 0) {
-   return status;
+//-
+// Set the stack size if requested, but not less than a platform reasonable
+// value.
+//
+if(pd-stackSize) {
+if(pd-stackSize  PTHREAD_STACK_MIN)
+pd-stackSize = PTHREAD_STACK_MIN;
+pthread_attr_setstacksize( thread_attr, pd-stackSize);
+if(status != 0) {
+return status;
+}
 }
 
-if(defaultStackSize  pd-stackSize) {
-
-   pthread_attr_setstacksize( thread_attr, pd-stackSize);
-   if(status != 0) {
-   return status;
-   }
-}
-
 //-
 // Now get what we actually have...
 //
-pthread_attr_getstacksize( thread_attr, defaultStackSize);
+size_t size;
+pthread_attr_getstacksize( thread_attr, size);
 if(status != 0) {
return status;
 }
+pd-stackSize = size;
 
-pd-stackSize = defaultStackSize;
-
 //-
 // Prohibit the stack size from being changed.
 //
@@ -635,18 +635,15 @@
 status = pthread_create((pd-tid), thread_attr,
ThreadPrivateActions::StartThread,
static_castvoid *(this));
-   
-// wait till the thread has actually started.
-pd-threadStartedBlock.block();
 
-if(status != 0) {
-   return status;
+if(status == 0) {
+// wait till the thread has actually started.
+pd-threadStartedBlock.block();
+
+pd-idSet = true;
 }
 
-pd-idSet = true;
-
-return 0;
-
+return status;
 }
 
 //-
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007  The Open Thread Group
 *
 * This library is open source and may be redistributed and/or modified under  
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 * 
 * This library 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.  See the 
 * OpenSceneGraph Public License for more details.
*/


//
// PThread.c++ - C++ Thread class built on top of posix threads.
// ~~~

#include stdlib.h
#include stdio.h
#include sys/types.h
#include unistd.h
#include pthread.h
#include limits.h

#if defined __linux || defined __sun || defined __APPLE__
#include string.h
#include sys/time.h
#include sys/resource.h
#include sys/unistd.h
#endif
#if defined(__sgi)
#include unistd.h
#endif
#if defined(__hpux)
#include sys/mpctl.h
#endif

#if defined(HAVE_THREE_PARAM_SCHED_SETAFFINITY) || defined(HAVE_TWO_PARAM_SCHED_SETAFFINITY)
#include sched.h
#endif
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MACH__)
	#include sys/types.h
	#include sys/sysctl.h
#endif

#include OpenThreads/Thread
#include PThreadPrivateData.h

#include iostream

using namespace OpenThreads;

#ifdef DEBUG
# define DPRINTF(arg) printf arg
#else
# define 

Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-16 Thread Thrall, Bryan
p...@graphics.cs.uni-sb.de wrote on Friday, October 16, 2009 4:32 AM:
 Problem reconstruction :
 
 osgAnimation Example osganimationnode, exchange the main proc. Instead
 of creating a viewer write out a file, as this.
 
 int main( int , char** )
 {
 osg::ref_ptr osg::Group  root = new osg::Group ;
 root-setInitialBound(osg::BoundingSphere(osg::Vec3(10,0,10),
30));
 root-addChild(createAxis());
 
 osg::MatrixTransform* node = setupAnimtkNode();
 root-addChild(node);
 
 if ( !root.valid() )
 osg::notify( osg::FATAL )  Failed in createSceneGraph() !

 std::endl ;
 bool arg = false;
 
 bool  result = osgDB::writeObjectFile( * ( root.get() ) ,
 animNode.osg ) ;
 if ( !result )
 osg::notify( osg::FATAL )  Failed in osgDB::writeNodeFile()
 !  std::endl ;
 }

The reason you get no update callback in the .osg file is that
osganimationnode uses a custom callback, AnimtkUpdateCallback, that the
.osg writer doesn't know about.

From the OpenSceneGraph-Data .osg files that have animation (such as
robot.osg), it looks like osgAnimation::BasicAnimationManager is
supported, so you could start with using that instead of
AnimtkUpdateCallback.

HTH,
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] I'm lost the UpdateCallbacks

2009-10-16 Thread Martin Großer

Hi,

I have a osg-file with UpdateCallbacks:

[...]
MatrixTransform {
DataVariance DYNAMIC
name Kugel01
nodeMask 0xff
cullingActive TRUE
UpdateCallbacks {
  AnimationPathCallback {
DataVariance DYNAMIC
[...]

I load the file with the line: osg::ref_ptr ::osg::Node  fileScene 
=  osgDB::readNodeFile(path);


I see the scene, but the fileScene has no UpdateCallback. What is my 
mistake? Anybody an idea? When I load the viel with the 
osg/bin/osgviewer then it works fine?


I have write a NodeVisitor to check the UpdateCallback:
-

class FindUpdateCallback : public osg::NodeVisitor
{

   public:


FindUpdateCallback():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)

{
}

virtual void apply(osg::Node node)
{
::osg::ref_ptr ::osg::NodeCallback ucb = 
node.getUpdateCallback();

if(ucb.valid()) std::cout  YES  std::endl;
else std::cout  NO  std::endl;
traverse(node);
}

virtual void apply(osg::MatrixTransform node)
{
apply((osg::Node)node);
}

virtual void apply(osg::Group node)
{
apply((osg::Node)node);
}

 virtual void apply(osg::Geode node)
{
apply((osg::Node)node);
}
};

It prints always NO.

Cheers,

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


Re: [osg-users] Cameras View Matrix - I am perplexed

2009-10-16 Thread Frank Sullivan
I think that makes a lot of sense, Paul. After learning about this yesterday, 
it took me about a half hour to think it all through, and realize that it's all 
pretty much equivalent and boils down to arbitrary choices about how you want 
to orient your scene.

Frank

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





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


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread Luigi Calori

Not sure if this is the same problem:
I had a somehow similar problem of deployment (plugin not loading in 
deployed machine WITHOUT redist)

It has happened both on vs8 and vs9.
I somehow solved the problem of osgdb_osg and ive plugins not loading by 
copying the needed msoft dlls and manifests in osgPlugins-2.9.6 (awful 
hack  to be solved)
For other plugins, I compile my version of jpeg,curl and freetype into 
static lib from source using cmake via the cmakeports project


http://code.google.com/p/cmakeports/

So I do not need to use external dll that could have been built with  a 
different build chain.


I do not think the  USE_3RDPARTY_BIN  is related, If I remeber well, it 
is just a hint on Cmake to search external libs in a side library...
Nevertheless, you should be able to see which external libs have been 
got by using advanced view in the cmake gui


Hope it helps

Luigi

Alessandro Terenzi wrote:

Thank you for your help,
I already tryed to set the notify level to debug and, as far as I understand, plugins are 
always discovered but the only error message I see is DynamicLibrary::fail loading 
... no further detail is provided.

I just had to try to install the redistributables for Visual c++ 2005 SP1 on 
the deployment machine (even though I was providing my application with a 
manifest and corrensponding CRT), so I tried it but again this not solved the 
problem...actually on every deployment machine the installation of the 
redistributable looks not so 'polite' because it strarts but doesn't display a 
completion message, so I'm not so sure about a successful installation...

Tried also the dependency walker tool on the target machine, and some DLL are 
not found but they are the same as the RGB plugin that works. The missing DLL 
is DWMAPI.DLL, don't know what it is for...

Don't know if this could relate to this problem, but in CMake I see the 
USE_3RDPARTY_BIN set to ON by default...what does it mean?

Thank you again...
Kind regards,
Alessandro

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





___
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] Freetype and JPG plugins problems

2009-10-16 Thread alessandro terenzi
Thanks Luigi,
I tried to build libjpg, zlib and libpng using cmakeports project (very
useful by btw)...now jpg plugin gets loaded successfully (I guess) but I get
black objects. Actually I got an error in CMake so I tryied to modify the
make file but I'm not an expert so, I did something wrong for sure...I'll
keep trying.

Kind regards.
Alessandro

On Fri, Oct 16, 2009 at 5:24 PM, Luigi Calori l.cal...@cineca.it wrote:

 Not sure if this is the same problem:
 I had a somehow similar problem of deployment (plugin not loading in
 deployed machine WITHOUT redist)
 It has happened both on vs8 and vs9.
 I somehow solved the problem of osgdb_osg and ive plugins not loading by
 copying the needed msoft dlls and manifests in osgPlugins-2.9.6 (awful hack
  to be solved)
 For other plugins, I compile my version of jpeg,curl and freetype into
 static lib from source using cmake via the cmakeports project

 http://code.google.com/p/cmakeports/

 So I do not need to use external dll that could have been built with  a
 different build chain.

 I do not think the  USE_3RDPARTY_BIN  is related, If I remeber well, it is
 just a hint on Cmake to search external libs in a side library...
 Nevertheless, you should be able to see which external libs have been got
 by using advanced view in the cmake gui

 Hope it helps

 Luigi


 Alessandro Terenzi wrote:

 Thank you for your help,
 I already tryed to set the notify level to debug and, as far as I
 understand, plugins are always discovered but the only error message I see
 is DynamicLibrary::fail loading ... no further detail is provided.

 I just had to try to install the redistributables for Visual c++ 2005 SP1
 on the deployment machine (even though I was providing my application with a
 manifest and corrensponding CRT), so I tried it but again this not solved
 the problem...actually on every deployment machine the installation of the
 redistributable looks not so 'polite' because it strarts but doesn't display
 a completion message, so I'm not so sure about a successful installation...

 Tried also the dependency walker tool on the target machine, and some DLL
 are not found but they are the same as the RGB plugin that works. The
 missing DLL is DWMAPI.DLL, don't know what it is for...

 Don't know if this could relate to this problem, but in CMake I see the
 USE_3RDPARTY_BIN set to ON by default...what does it mean?

 Thank you again...
 Kind regards,
 Alessandro

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





 ___
 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] Is there any examples about OpenThreads?

2009-10-16 Thread Cory Riddell
Ulrich,

Ulrich Hertlein wrote:
 Hi Cory,

 On 13/10/09 3:47 PM, Cory Riddell wrote:
 As I understand it, basically every core has it's own cache. So, if some
 data is shared between multiple threads, it may be loaded into multiple
 caches all at once. If one thread makes a change, the value cached by
 the other core/thread is now stale. Synchronizing flushes the caches, so
 any pending writes are made to the main store. The next time anybody
 tries to read that value, it won't be in their cache and the data will
 be read from the main store.

 Just to clarify:

 Yes, CPUs usually have their own caches and data can be different in
 the different caches.  However, this isn't what synchronization is
 solving.  This problem (cache coherency) is handled by the hardware.

 The reason you need to do locking is because two threads (which may or
 may not run on separate cores) might alter the same data in ways so
 that the result is no longer sane.

You might be right. If you want to rely on that, then you really need to
know what hardware you are running on and what the memory model is. I
don't believe C++ has a standard memory model.

The last time I really dug into this was a couple of years ago. If I
remember correctly, the Intel chips of that era promised only a very
weak memory model. In practice, they had a much stronger memory model.
In fact, the only cpu that I know had a very weak memory model was the
Alpha and those haven't been around for a while now.

I thought cache coherency depended on cues from the software. For
example, acquiring or releasing a mutex forces any pending writes to
complete then flushed the caches, marking a value as volatile prevented
any caching, etc... Is this wrong?

Cory

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


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread alessandro terenzi
I managed to let the jpg plugin work as suggested by Luigi, really thanks.

By the way, Luigi you talked about also cmakeports for curl and freetype,
but they are not public available yet, am I wrong? Can you share the
freetype port?

Thanks again for your help!
Regards.
Alessandro

On Fri, Oct 16, 2009 at 5:24 PM, Luigi Calori l.cal...@cineca.it wrote:

 Not sure if this is the same problem:
 I had a somehow similar problem of deployment (plugin not loading in
 deployed machine WITHOUT redist)
 It has happened both on vs8 and vs9.
 I somehow solved the problem of osgdb_osg and ive plugins not loading by
 copying the needed msoft dlls and manifests in osgPlugins-2.9.6 (awful hack
  to be solved)
 For other plugins, I compile my version of jpeg,curl and freetype into
 static lib from source using cmake via the cmakeports project

 http://code.google.com/p/cmakeports/

 So I do not need to use external dll that could have been built with  a
 different build chain.

 I do not think the  USE_3RDPARTY_BIN  is related, If I remeber well, it is
 just a hint on Cmake to search external libs in a side library...
 Nevertheless, you should be able to see which external libs have been got
 by using advanced view in the cmake gui

 Hope it helps

 Luigi


 Alessandro Terenzi wrote:

 Thank you for your help,
 I already tryed to set the notify level to debug and, as far as I
 understand, plugins are always discovered but the only error message I see
 is DynamicLibrary::fail loading ... no further detail is provided.

 I just had to try to install the redistributables for Visual c++ 2005 SP1
 on the deployment machine (even though I was providing my application with a
 manifest and corrensponding CRT), so I tried it but again this not solved
 the problem...actually on every deployment machine the installation of the
 redistributable looks not so 'polite' because it strarts but doesn't display
 a completion message, so I'm not so sure about a successful installation...

 Tried also the dependency walker tool on the target machine, and some DLL
 are not found but they are the same as the RGB plugin that works. The
 missing DLL is DWMAPI.DLL, don't know what it is for...

 Don't know if this could relate to this problem, but in CMake I see the
 USE_3RDPARTY_BIN set to ON by default...what does it mean?

 Thank you again...
 Kind regards,
 Alessandro

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





 ___
 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] SVN commit bottleneck

2009-10-16 Thread Robert Osfield
Hi Chris,

On Mon, Oct 12, 2009 at 6:49 PM, Chris 'Xenon' Hanson
xe...@alphapixel.com wrote:
  Ok. I can understand that. Are there any aspects of submission review that 
 could be
 outsourced?

I've already outsourced aspects of the submission review that are the
easy and most productive areas.  osgAnimation and the Xcode projects
are maintaining themselves quite well.  The branches are rather less
active though, with plenty of engineers with write access but all but
me and very occasionally Paul Martz active.



 The idea of have a range of engineers  to have write access to
 branches and with the ability to taken the driving seat with making
 stable releases is something we discussed and put into place around a
 year ago.  Alas apart from Paul Mart'z 2.6.1 release there hasn't been
 any impetus from the community to drive this forward.  The key point
 is that I was trying to step back from having to be the impetus behind
 releases and to allow others to take the reigns.

  I think this is a good plan. I'm not sure I can volunteer to be the sole 
 driving force
 behind a release (in fact, I know I can't) but it's possible we could 
 assemble a few
 people that together could do so.

We'll without volunteers pushing it forward then it'll just fall back
to myself to do when available.

  Is there anyone reading this who could help get the next release out as part 
 of a group?

I'm been away for almost a week and no other engineers and jumping in
so I guess not at this time.

  Do we have a release procedure document?

Not yet.  Cmake actually now does most of the hard work for us.  It's
just a case of

  make tag-test

Then when you're happy with what it's going to do with the subversion branch:

  make tag-run

Then it's a case of updating the website with source archives and
binaries.  But the real task is not the actual release but the effort
in coordinating everyone, doing testing and reviewing and merging
submissions.  It's a community process that is out there in the open.

As a general note, we don't even have people coming forward
volunteering to drive releases, so writing detailed docs would rather
go to waste... The thing to do is find volunteers and let them be
assisted by myself and others on the first few minor point releases
they do and document/evolve things to make them more streamlined as
you go along.

 appropriate thing to do.  For these reasons I'm more inclined to
 believe that having a single gate keeper of the source is far more of
 an asset that it is a bottleneck.

  I can understand that. As I mentioned above, perhaps it's worth pursuing 
 refactoring off
 any duties short of the actual SVN commit. Are there other things you think 
 could be done
 by the community?

Um pre testing of submissions is about all we can do, this is
already done on occasional submissions that are of interest to others
that can't wait for me to get to it, this certainly helps, but it's
very occasional.  Everyone has there own projects to work on though,
so I really don't expect that others will happily devote time to just
routine pre-review of submissions.  The bottom line is that people
have to have an itch to scratch.

Personally I wouldn't say review of submissions is a significant
bottleneck for the project.  It's an occasional bottleneck that will
affect different engineers at different times.  In terms of workload
submissions isn't the biggest problem I face in a managing the project
- it's keeping up with general support and driving releases.  It's
this big stuff that I've been able to partly take a back seat on -
general support is handled pretty well in my absence, but driving
releases has been close to a void.  Even when Don was around it was
still me driving almost all releases of OpenThreads, Producer and
OpenSceneGraph.

The door is open for others to dive in a help, but if members of the
community are too busy writing great software then so be it, I'm happy
to keep chugging along, but the pace will have to fit in with my own
professional and personal constraints.

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


Re: [osg-users] [osgCompute] Problems compiling osgCuda

2009-10-16 Thread Arun Yoganandan
Hi Mick,

I can gladly help testing on a 64bit machine from my end.

OsgCuda seems to compile when I linked to the 32bit cudart.lib library. But I 
get a lot of errors when compiling the examples provided.

List of errors for osgTexDemo.
1-- Build started: Project: Examples osgTexDemo, Configuration: Debug 
Win32 --
1Compiling...
1TexStreamer.gen.cpp
1C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\crtdefs.h(480) : 
error C2371: 'size_t' : redefinition; different basic types
1predefined C++ types (compiler internal)(19) : see declaration of 
'size_t'
1C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdlib.h(395) : 
error C4235: nonstandard extension used : '__unaligned' keyword not supported 
on this architecture
1c:\cuda\include\texture_fetch_functions.h(1913) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\texture_fetch_functions.h(1922) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\texture_fetch_functions.h(1931) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\texture_fetch_functions.h(1940) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\texture_fetch_functions.h(1949) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\texture_fetch_functions.h(1958) : error C2719: 'index': 
formal parameter with __declspec(align('16')) won't be aligned
1c:\cuda\include\math_functions.h(1613) : error C2719: 'x': formal parameter 
with __declspec(align('8')) won't be aligned
1c:\cuda\include\math_functions.h(1613) : error C2719: 'y': formal parameter 
with __declspec(align('8')) won't be aligned
1Build log was saved at 
file://c:\Users\Tatric\Desktop\osgCompute-0.4\build\examples\osgTexDemo\src\example_osgTexDemo.dir\Debug\BuildLog.htm
1Examples osgTexDemo - 10 error(s), 0 warning(s)
== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==



Thank you!

Cheers,
Arun

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





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


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread Luigi Calori
The freetype support should be in svn, there is probably a problem in 
cmake downloading from the freetype link... I had problem and put
a wget exe in the path, so cmake find it and use it to download, get it 
from:


wget:
html: http://gnuwin32.sourceforge.net/packages/wget.htm
bin:  http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip
dep:  http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip

regarding curl, the latest distribution include cmake support, 
unfortunately it lacks install ... i made myself
If you are interested, I can send you a readme to document my layout and 
the needed step to build deps and osg,

It would be useful also for myself.
If anyone else would be interested we could put it on the wiki once tested

Regards.
Luigi

alessandro terenzi wrote:
I managed to let the jpg plugin work as suggested by Luigi, really 
thanks.


By the way, Luigi you talked about also cmakeports for curl and 
freetype, but they are not public available yet, am I wrong? Can you 
share the freetype port?


Thanks again for your help!
Regards.
Alessandro

On Fri, Oct 16, 2009 at 5:24 PM, Luigi Calori l.cal...@cineca.it 
mailto:l.cal...@cineca.it wrote:


Not sure if this is the same problem:
I had a somehow similar problem of deployment (plugin not loading
in deployed machine WITHOUT redist)
It has happened both on vs8 and vs9.
I somehow solved the problem of osgdb_osg and ive plugins not
loading by copying the needed msoft dlls and manifests in
osgPlugins-2.9.6 (awful hack  to be solved)
For other plugins, I compile my version of jpeg,curl and freetype
into static lib from source using cmake via the cmakeports project

http://code.google.com/p/cmakeports/

So I do not need to use external dll that could have been built
with  a different build chain.

I do not think the  USE_3RDPARTY_BIN  is related, If I remeber
well, it is just a hint on Cmake to search external libs in a side
library...
Nevertheless, you should be able to see which external libs have
been got by using advanced view in the cmake gui

Hope it helps

Luigi


Alessandro Terenzi wrote:

Thank you for your help,
I already tryed to set the notify level to debug and, as far
as I understand, plugins are always discovered but the only
error message I see is DynamicLibrary::fail loading ... no
further detail is provided.

I just had to try to install the redistributables for Visual
c++ 2005 SP1 on the deployment machine (even though I was
providing my application with a manifest and corrensponding
CRT), so I tried it but again this not solved the
problem...actually on every deployment machine the
installation of the redistributable looks not so 'polite'
because it strarts but doesn't display a completion message,
so I'm not so sure about a successful installation...

Tried also the dependency walker tool on the target machine,
and some DLL are not found but they are the same as the RGB
plugin that works. The missing DLL is DWMAPI.DLL, don't know
what it is for...

Don't know if this could relate to this problem, but in CMake
I see the USE_3RDPARTY_BIN set to ON by default...what does it
mean?

Thank you again...
Kind regards,
Alessandro

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 



___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] New OpenGL texture object and buffer object pool support

2009-10-16 Thread Robert Osfield
Hi Cedric,

osgViewer/core OSG should already have all the mechanisms available to
do clean up of the scene graph and associated OpenGL objects correctly
- and in fact it's possibly these existing mechanisms that are causing
the failure in question.  I suspect the solution will come from
studying exactly what is happening and when during the destruction
phases of the graphics threads, graphics context, scene graph and
viewer, something small is likely amiss - the challenging is
pinpointing exactly what this something small is...

Once I've progressed the OpenGL ES 2.0 port a bit further I'll revisit
this issue, my expectation is that it'll just require a couple of
hours of TLC.

Robert.

On Sun, Oct 11, 2009 at 3:08 PM, Cedric Pinson
cedric.pin...@plopbyte.net wrote:
 Hi Robert,

 I think to address the problem but i need to finish other stuff before.
 A way i thought to resolve that should be to add to osgViewer a cleanup
 method that would release all singleton and data that make it safe to
 quit an application. A method like that could be called automatically by
 osgViewer destructor or by hand maybe.
 It's not clear enough to me how the cleanup could be, but maybe it could
 be a way to clean the exit.

 Cheers,
 Cedric

 --
 +33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net


 On Sun, 2009-10-11 at 07:33 +0100, Robert Osfield wrote:
 Hi Cedric,

 As another lead into this problem I've found that the osgcatch example
 now hangs on exit when it's run multi-threaded.  All the other
 examples exit fine, but osgcatch hangs inside th new TextureObject
 clean up code at a mutex that seems to be left locked by another
 thread.  I don't know why this is, but clearly there is something
 fragile in the clean that will need addressing.

 Robert.


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


Re: [osg-users] Databasepager + multiple views + different camera positions = memory leak?

2009-10-16 Thread Robert Osfield
Hi Sergey,

On Tue, Oct 13, 2009 at 11:41 PM, sergey leontyev sleon...@ist.ucf.edu wrote:
 Robert and others,
 I checked the stats as you recommended. What I see is that LOD value for 
 both cameras is increasing when nothing in the application is changing. The 
 same is true for the CULL value. No other values change by any significant 
 amount, but LOD and CULL increase indefinitely. Any ideas

I don't have any ideas why this occurring.  One would expect the
number of nodes to increase when you move to the new camera positions
but should settle down quite quickly once all the require nodes are
paged in.  Do you see any visual difference in the scene when the
number of LODs increase?

Also could you modify one of the OSG examples to illustate the problem
you are seeing and then publish this so others like myself can test
against.

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


Re: [osg-users] Databasepager + multiple views + different camera positions = memory leak?

2009-10-16 Thread sergey leontyev

robertosfield wrote:
 Hi Sergey,
 
 On Tue, Oct 13, 2009 at 11:41 PM, sergey leontyev  wrote:
 I don't have any ideas why this occurring.  One would expect the
 number of nodes to increase when you move to the new camera positions
 but should settle down quite quickly once all the require nodes are
 paged in.  Do you see any visual difference in the scene when the
 number of LODs increase?
 
 Also could you modify one of the OSG examples to illustate the problem
 you are seeing and then publish this so others like myself can test
 against.
 
 Robert.
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


Robert,
I don't see any visual changes, it appears to be fully loaded. With everything 
shown with the highest detail. 
Sure, i can modify an example to try to replicate the problem. I will try to do 
it right now.

Thanks!
Sergey

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





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


Re: [osg-users] [osgPlugins] Freetype and JPG plugins problems

2009-10-16 Thread alessandro terenzi
Thank you again Luigi, it would be very useful if you could send the
readme document you talked about.

Kind regards,
Alessandro

On Friday, October 16, 2009, Luigi Calori l.cal...@cineca.it wrote:
 The freetype support should be in svn, there is probably a problem in cmake 
 downloading from the freetype link... I had problem and put
 a wget exe in the path, so cmake find it and use it to download, get it from:

 wget:
 html: http://gnuwin32.sourceforge.net/packages/wget.htm
 bin:  http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip
 dep:  http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip

 regarding curl, the latest distribution include cmake support, unfortunately 
 it lacks install ... i made myself
 If you are interested, I can send you a readme to document my layout and the 
 needed step to build deps and osg,
 It would be useful also for myself.
 If anyone else would be interested we could put it on the wiki once tested

 Regards.
 Luigi

 alessandro terenzi wrote:

 I managed to let the jpg plugin work as suggested by Luigi, really thanks.

 By the way, Luigi you talked about also cmakeports for curl and freetype, but 
 they are not public available yet, am I wrong? Can you share the freetype 
 port?

 Thanks again for your help!
 Regards.
 Alessandro

 On Fri, Oct 16, 2009 at 5:24 PM, Luigi Calori l.cal...@cineca.it 
 mailto:l.cal...@cineca.it wrote:

     Not sure if this is the same problem:
     I had a somehow similar problem of deployment (plugin not loading
     in deployed machine WITHOUT redist)
     It has happened both on vs8 and vs9.
     I somehow solved the problem of osgdb_osg and ive plugins not
     loading by copying the needed msoft dlls and manifests in
     osgPlugins-2.9.6 (awful hack  to be solved)
     For other plugins, I compile my version of jpeg,curl and freetype
     into static lib from source using cmake via the cmakeports project

     http://code.google.com/p/cmakeports/

     So I do not need to use external dll that could have been built
     with  a different build chain.

     I do not think the  USE_3RDPARTY_BIN  is related, If I remeber
     well, it is just a hint on Cmake to search external libs in a side
     library...
     Nevertheless, you should be able to see which external libs have
     been got by using advanced view in the cmake gui

     Hope it helps

     Luigi


     Alessandro Terenzi wrote:

         Thank you for your help,
         I already tryed to set the notify level to debug and, as far
         as I understand, plugins are always discovered but the only
         error message I see is DynamicLibrary::fail loading ... no
         further detail is provided.

         I just had to try to install the redistributables for Visual
         c++ 2005 SP1 on the deployment machine (even though I was
         providing my application with a manifest and corrensponding
         CRT), so I tried it but again this not solved the
         problem...actually on every deployment machine the
         installation of the redistributable looks not so 'polite'
         because it strarts but doesn't display a completion message,
         so I'm not so sure about a successful installation...

         Tried also the dependency walker tool on the target machine,
         and some DLL are not found but they are the same as the RGB
         plugin that works. The missing DLL is DWMAPI.DLL, don't know
         what it is for...

         Don't know if this could relate to this problem, but in CMake
         I see the USE_3RDPARTY_BIN set to ON by default...what does it
         mean?

         Thank you again...
         Kind regards,
         Alessandro

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





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




     ___
     osg-users mailing list
     osg-us...@lists.openscenegraph.org
     mailto: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