Re: [osg-users] Coupling luabind with OSG + Bullet

2008-11-12 Thread Gerwin de Haan
I don't use Luabind either but osgswig with Python instead. I sometimes
experience similar surprising effects when passing non-declared variables as
function arguments. In that case, the reason for this is often that the
scripting language garbage collector deletes the Vec3f after returning from
the function, essentially leaving any references to the Vec3 dangling. A
correct reference counting mechanism in the scripting binding should prevent
this in most cases.

The problem you're describing could have similar cause. So just to be sure,
try and define the Vec3f in the global scope and pass a reference as an
argument in your call.:
myvec= Vec3f(2,0,0)
entMan:createStaticEntity( ball, myvec, false )
Or, in this function, try and make a copy of the parameter values before
returning.

regards,
Gerwin


On Wed, Nov 12, 2008 at 8:14 AM, Dusten Sobotta [EMAIL PROTECTED]wrote:

 Hello,

 I've been working on an engine that combines sdl, osg, bullet, open al, and
 now lua for roughly 6 weeks.  Static and dynamic entity creation works well
 on the fly if handled with C++ code, however if I attempt to off-load this
 logic to lua, I run into problems.  Below is an example of code that is
 relevant to the problem:

 
 void entityManager::loadStaticEntityList( const std::string filename ) {

 lua_State *L = lua_open();
 luabind::open(L);

 luabind::module( L ) [

 luabind::class_osg::Vec3f(Vec3f)
 .def( luabind::constructor float, float, float () )
 ];

 luabind::module( L ) [

 luabind::class_entityManager(entityManager)
 .def( luabind::constructor () )
 .def( createStaticEntity, entityManager::createStaticEntity )
 .def(destroyAllEntities, entityManager::destroyAllEntities )
 ];


 if( luaL_loadfile( L, filename.c_str() ) || lua_pcall( L, 0, 0, 0 ) )
 throw could not load entity list;


 createStaticEntity( ball, osg::Vec3f( 0, 0, 0 ), false ); //direct
 C++ call; works!

 luaL_dofile( L, filename.c_str() );

 }
 ///

 ///
 void entityManager::createStaticEntity( const std::string type, const
 osg::Vec3f position, const bool dimension ) {

 entity * newEntity = createEntityP( type, position, dimension );
 _physicsManager-defineRigidBody( newEntity, type, false, dimension );

 entities[ newEntity-getRigidBody() ] = newEntity;
 staticEntities[ dimension ]-addChild( newEntity-getPAT().get() );
 staticEntityList.push_back( newEntity );
 }
 ///

 And here is the lua script I'm trying to run:

 --
 entMan = entityManager()
 a = Vec3f( 0, 0, 0 )

 --same call from within lua; crashes the engine if uncommented!
 entMan:createStaticEntity( ball, Vec3f( 2, 0, 0 ), false )
 --


 As you can see, a declaration of type Vec3f works from within lua, so I
 don't think that using Vec3f as a parameter is an issue.
 Might anyone know what's going on here?  I'm not very familiar with
 luabind, and even less familiar with getting it to play nicely with OSG.
 Any help would be greatly appreciated.



 Thanks for your time,

 Dusten

 ___
 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] compositeViewer newbie question

2008-11-12 Thread Robert Osfield
Hi Dan,

On Tue, Nov 11, 2008 at 8:43 PM, Dan Small [EMAIL PROTECTED] wrote:
 We used the second approach you mentioned, threw all the views in one
 window,   not surprisingly the memory utilization went way down.
 Thanks for correcting our GL naivete.

 It seems tho that the 2nd approach also limits us to single-threaded only;
 would you concur?  We have an 8-core Dell we are running this on, and it
 would be nice to avail ourselves of the multithreading features if we can.

Well if you have one context your only have the ability to use one
graphics thread that drives one GPU so you are limited to a certain
extent, but this doesn't limit you on the cull traversal side - you
can use DrawThreadPerContext and
CullThreadPerCameraDrawThreadPerContext which will give you a little
speed up.

It's worth noting that unless you put your windows on a second GPU all
the traffic to the GPU will be serialized anyway, and its far more
efficient for the OSG to do this on one graphics context than have the
OpenGL driver try to chop and change between many contexts and many
threads filling the FIFOs, and only one graphics card being able to
drain it.  This all means that the one graphics thread is actually the
best use of GPU resouces.

The reduction in memory consumption and bandwidth to GPU requirement
will also get you lots of performance back.

 btw, I wasn't my intent to imply there was a bug in the OSG, only in that
 way that we were using it :)

No offence taken, I was just being try to clear about the causes and
possible avenues for a solution.

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


Re: [osg-users] Particle system setInitialRotationalSpeedRange()

2008-11-12 Thread Robert Osfield
Hi Thom,

Thanks for the detective work. The change you've suggested as causing
the regression is r7961.

   http://www.openscenegraph.org/projects/osg/changeset/7961

It's six months since I code this so it's a bit cold a topic so off
the top of my head I can't point to anything in a particular as being
the cause of the problems.  I will have to sit down and step through
the code.

Thanks for pointing out that SmokeBox.osg reproduces the problem, with
the problem in front of me it's very difficult to spot issues in code.

Robert.


On Tue, Nov 11, 2008 at 11:21 PM, Jolley, Thomas P
[EMAIL PROTECTED] wrote:
 Hi Robert,

 I've looked into this a little further.  It appears the changes you made to
 ParticleSystem.cpp on March 17th is the reason for the behavior change.  I
 don't have a solution yet other than backing out the changes.  I'm still
 trying to understand what you're doing in the single_pass_render function
 before coming up with a solution.

 I think this problem was mentioned in an earlier thread around May.
 See 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-May/011595.html.

 To see the problem look at SmokeBox.osg with osgviewer (I'm using osg
 2.6.0).  The particles are rotating about the wrong axis (or at least a
 different axis).

 
 Tom Jolley


 
 From: Jolley, Thomas P
 Sent: Thursday, August 21, 2008 2:11 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange()

 Hi Erik,

 I noticed the same thing about a week ago while upgrading an application
 from osg 1.0 to 2.4.  It was on my list of things to look into.

 
 From: Erik Johnson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 21, 2008 10:30 AM
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange()

 There is certainly a change in behavior, although I can't pinpoint the
 change in code yet.

 Setting the rotational speed with (0, 0, 1):
 OSG 2.2.0 - particles rotate like fans (pinwheels)
 OSG 2.4.0 - particles rotate like a margarita blender (cork-screw)
 OSG 2.6.0 - particles rotate like a margarita blender (cork-screw)

 I guess I'm just wondering if this is the expected behavior?  And I'm
 surprised nobody has a problem with this.

 Thanks,
 Erik


 Date: Thu, 21 Aug 2008 09:26:52 +0100
 From: Robert Osfield [EMAIL PROTECTED]
 Subject: Re: [osg-users] Particle system
setInitialRotationalSpeedRange()
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Message-ID:
[EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1

 Hi Erik,

 osgParticle has hardly been touched between OSG-2.2 and 2.6.   Use svn
 log to check which files have changed.

 Robert.

 On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  It seems to me, back in the OSG 2.2.x time frame, that I could set the
  initial rotational velocity of the RadialShooter and have the particles
  pinwheel around their center point, while maintaining their billboard
  orientation and face the Camera.  Perhaps it was a rotation on the Y
  axis.
 
  Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the
  particles to rotate relative to the world axis and not in the
  camera-relative axis.
 
  Is this a bug? A feature?  Is it still posible to pinwheel a particle
  around?  Does anyone use setInitialRotationalSpeedRange()?
 
  This was a cool effect which added a nice dimension to smoke plumes and
  such.
 
  Thanks for any info!
  -Erik Johnson
 
 
  ___
  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] osg Collada Plugin

2008-11-12 Thread Steffen B.
Hi all,

i have ab problem with the light in osg.
If i load a collada file everythig is very bright.
Most of the Objekts are white. 

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


Re: [osg-users] osg Collada Plugin

2008-11-12 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steffen B. wrote:
 
 Hi all,
  
 i have ab problem with the light in osg.
 If i load a collada file e verythig is very bright.
 Most of the Objekts are white.
  

If you do not say more, there is not much anybody could do to help you.

Do you have normals that are not normalized in the data file? Is there
an extra light where one shouldn't be? This could have a lot of reasons.

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJGrw7n11XseNj94gRAleZAKCwFiIE9hYknSo7WfUugJoGG0RFeACgsoZ9
qwFNTlhPZOVjt86d/2GTo4U=
=uozy
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBO FrameBufferObject and stencil support

2008-11-12 Thread Robert Osfield
Hi Himar,

On Wed, Nov 12, 2008 at 10:56 AM, Himar Carmona [EMAIL PROTECTED] wrote:
1) Does OSG 2.6.1 supports FBO with stencil buffer attachment?

It should do.  I haven't personally tested it, but the code paths are all there.

2) Does it supports EXT_PACKED_DEPTH_STENCIL?

2.6.1 doesn't support this extension, but I merged a submission for
this last week so it's in 2.7.5 and 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] Dynamically changing all textures in a scene

2008-11-12 Thread Robert Osfield
On Wed, Nov 12, 2008 at 11:26 AM, David Spilling
[EMAIL PROTECTED] wrote:
 The osg Depictions thread is here :
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg10685.html

Thanks for the link links is very useful, I don't recall this thread
so perhaps I was away...  Following the thread to the post about
Depictions:

   http://www.mail-archive.com/[EMAIL PROTECTED]/msg10863.html

Which if I read it right boils down to having a custom StateAttribute
that works effectively like a proxy, and has a list of Texture that it
can it can select between to choose which to apply.  It's a shame that
StateAttribute doesn't take RenderInfo as a parameter as then you can
check which view/camera you are working with based on what RenderInfo
specifies.

Still it's a very neat way of using the extensibility of the OSG's
State system ;-)

Refactoring all the StateAttributes to have an apply(RenderInfo) is
something that probably needs to be done to keep it inline with how
Drawable was generalised last year - draw(State) was replaced with
draw(RenderInfo).

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


[osg-users] osg Collada Plugin

2008-11-12 Thread Steffen B.
I have create a Scene using 3DS MAX. There are 8 lights in the scene.
After that i export the model to .dae and load it into osg.
I think that the normals are normalized.

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


Re: [osg-users] crash withmultimonitormultithreadnVIDIAworkaroundenabled

2008-11-12 Thread Wojciech Lewandowski

Hi Marco,

I agree. This definitely looks like a bug. But it might be related to 
particular card. I tried today Vista x64 with 178.24 on GeForce 280 GTX. 
Everything was ok. Both osgviewer and my example ran fine.


Cheers,
Wojtek


Hi Wojtek,

your test case behaves exactly as osgViewer does. The app crashes when 
wglMakeCurrent() gets called for the second time. Setting 
repeatMakeCurrent to 0 fixes the crash.
One thing I forgot to say, is that it doesn't always crash: the 
success/failure ratio is about 1 to 15. This applies to both osgViewer and 
your test program.
Also, it seems that forcing the multithreaded optimization option to 
enabled in the nVIDIA Control Panel (it defaulted to automatic in my 
driver) makes things work. I still consider this a driver bug, however, 
because leaving an optional optimization to its default value should never 
crash applications.


Marco


--
From: Wojciech Lewandowski [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2008 11:42 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] crash 
withmultimonitormultithreadnVIDIAworkaround enabled



Hi Marco,

Here it is. My server does not like sending exectuables. I hope You don't
mind VS 9.0 source  solution.

Example is as simple as multithreaded opengl example can be. WindowOGL 
class

does initlaization in one thread and rendering in the other thread. Its
repeatMakeCurrent variable is set to 1 by default which means that each
makeCurrentContext will be repeated once.  So if everything goes exactly
like with osgViewer it should the crash there. If you find that example
works, try runing with repeatMakeCurrent set to 0 and check if the screen 
is

all green (does not display red triangle). Red triangle would mean that
drivers have remained broken.

Thanks a lot.
Wojtek Lewandowski



Thanks, Marco.

I will send this code tomorrow from my office. I don't have it at home.

Cheers,
Wojtek

Hi Wojtek,


Its really weird. I am pretty much sure we have tested this with Vista
x64,
but maybe not the latest drivers. May I send you simpified OpenGL only
repro
I have sent to NVidia as a bug report ? I am curious if the crash will
happen with it as well ?


Sure, I'm glad to help.

Marco


___
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] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jean-Sébastien Guay

Hi Jeremy,


These will be in shortly; osgCairo is done, the osgPango patch was
harder because I had an ungodly amount of changes in the works. :)


I just updated. Most changes are in, but I think you missed the last 
patch I sent for osgPango (which was in addition to the first one I sent 
Sunday night). Here it is again - nothing really complicated, but it 
makes osgpangoanimation and osgpangoguiviewer build against the 
osgWidget/osgAnimation branch.


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
Index: examples/osgpangoanimation/CMakeLists.txt
===
--- examples/osgpangoanimation/CMakeLists.txt   (revision 25)
+++ examples/osgpangoanimation/CMakeLists.txt   (working copy)
@@ -4,7 +4,10 @@
 # current project, but we need to add the postfix for the other libs.
 LINK_LIBRARIES(osgPango
debug OpenThreads${CMAKE_DEBUG_POSTFIX}
-   optimized OpenThreads)
+   optimized OpenThreads
+   debug osgGA${CMAKE_DEBUG_POSTFIX}
+   optimized osgGA
+)
 
 ADD_EXECUTABLE(osgpangoanimation osgpangoanimation.cpp)
 
Index: examples/osgpangoanimation/osgpangoanimation.cpp
===
--- examples/osgpangoanimation/osgpangoanimation.cpp(revision 25)
+++ examples/osgpangoanimation/osgpangoanimation.cpp(working copy)
@@ -9,6 +9,8 @@
 #include osgAnimation/EaseMotion
 #include osgPango/Text
 
+#include stdlib.h
+
 // const unsigned int WINDOW_WIDTH  = 720;
 // const unsigned int WINDOW_HEIGHT = 480;
 
@@ -56,7 +58,7 @@

_motions[i] = MyMotion(0, duration, 3.14, 
osgAnimation::Motion::LOOP);

-   float offset = (random() * 1.0 / (1.0 * 
RAND_MAX)) * duration;
+   float offset = (rand() * 1.0 / (1.0 * 
RAND_MAX)) * duration;

_motions[i].setTime(offset);
}
@@ -141,8 +143,8 @@
const osg::Vec2 size = t-getSize();
 
t-setMatrix(osg::Matrix::translate(
-   round((WINDOW_WIDTH - size.x()) / 2.0f),
-   size.y() + round((WINDOW_HEIGHT - size.y()) / 2.0f),
+osg::round((WINDOW_WIDTH - size.x()) / 2.0f),
+size.y() + osg::round((WINDOW_HEIGHT - size.y()) / 2.0f),
0.0f
));
 
@@ -154,7 +156,7 @@
 
camera-addChild(t);
 
-   viewer.setUpViewInWindow(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
+   viewer.setUpViewInWindow(50, 50, WINDOW_WIDTH, WINDOW_HEIGHT);
viewer.setSceneData(camera);
viewer.getCamera()-setClearColor(osg::Vec4(0.2f, 0.2f, 0.2f, 1.0f));
 
Index: examples/osgpangoguiviewer/CMakeLists.txt
===
--- examples/osgpangoguiviewer/CMakeLists.txt   (revision 25)
+++ examples/osgpangoguiviewer/CMakeLists.txt   (working copy)
@@ -4,7 +4,10 @@
 # current project, but we need to add the postfix for the other libs.
 LINK_LIBRARIES(osgPango
debug OpenThreads${CMAKE_DEBUG_POSTFIX}
-   optimized OpenThreads)
+   optimized OpenThreads
+   debug osgDB${CMAKE_DEBUG_POSTFIX}
+   optimized osgDB
+)
 
 ADD_EXECUTABLE(osgpangoguiviewer osgpangoguiviewer.cpp)
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jeremy Moles
On Wed, 2008-11-12 at 09:26 -0500, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  These will be in shortly; osgCairo is done, the osgPango patch was
  harder because I had an ungodly amount of changes in the works. :)
 
 I just updated. Most changes are in, but I think you missed the last 
 patch I sent for osgPango (which was in addition to the first one I sent 
 Sunday night). Here it is again - nothing really complicated, but it 
 makes osgpangoanimation and osgpangoguiviewer build against the 
 osgWidget/osgAnimation branch.

Ah thanks. :) I had changed so much in osgPango without committing I had
to do the initial patch by hand (though I prefer that way anyways so I
can see what's going on. :)) Looks like I missed some.

Thanks!

 Thanks,
 
 J-S
 plain text document attachment (osgPango-3.patch)
 Index: examples/osgpangoanimation/CMakeLists.txt
 ===
 --- examples/osgpangoanimation/CMakeLists.txt (revision 25)
 +++ examples/osgpangoanimation/CMakeLists.txt (working copy)
 @@ -4,7 +4,10 @@
  # current project, but we need to add the postfix for the other libs.
  LINK_LIBRARIES(osgPango
 debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 -   optimized OpenThreads)
 +   optimized OpenThreads
 +   debug osgGA${CMAKE_DEBUG_POSTFIX}
 +   optimized osgGA
 +)
  
  ADD_EXECUTABLE(osgpangoanimation osgpangoanimation.cpp)
  
 Index: examples/osgpangoanimation/osgpangoanimation.cpp
 ===
 --- examples/osgpangoanimation/osgpangoanimation.cpp  (revision 25)
 +++ examples/osgpangoanimation/osgpangoanimation.cpp  (working copy)
 @@ -9,6 +9,8 @@
  #include osgAnimation/EaseMotion
  #include osgPango/Text
  
 +#include stdlib.h
 +
  // const unsigned int WINDOW_WIDTH  = 720;
  // const unsigned int WINDOW_HEIGHT = 480;
  
 @@ -56,7 +58,7 @@
   
   _motions[i] = MyMotion(0, duration, 3.14, 
 osgAnimation::Motion::LOOP);
   
 - float offset = (random() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
 + float offset = (rand() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
   
   _motions[i].setTime(offset);
   }
 @@ -141,8 +143,8 @@
   const osg::Vec2 size = t-getSize();
  
   t-setMatrix(osg::Matrix::translate(
 - round((WINDOW_WIDTH - size.x()) / 2.0f),
 - size.y() + round((WINDOW_HEIGHT - size.y()) / 2.0f),
 +osg::round((WINDOW_WIDTH - size.x()) / 2.0f),
 +size.y() + osg::round((WINDOW_HEIGHT - size.y()) / 2.0f),
   0.0f
   ));
  
 @@ -154,7 +156,7 @@
  
   camera-addChild(t);
  
 - viewer.setUpViewInWindow(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
 + viewer.setUpViewInWindow(50, 50, WINDOW_WIDTH, WINDOW_HEIGHT);
   viewer.setSceneData(camera);
   viewer.getCamera()-setClearColor(osg::Vec4(0.2f, 0.2f, 0.2f, 1.0f));
  
 Index: examples/osgpangoguiviewer/CMakeLists.txt
 ===
 --- examples/osgpangoguiviewer/CMakeLists.txt (revision 25)
 +++ examples/osgpangoguiviewer/CMakeLists.txt (working copy)
 @@ -4,7 +4,10 @@
  # current project, but we need to add the postfix for the other libs.
  LINK_LIBRARIES(osgPango
 debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 -   optimized OpenThreads)
 +   optimized OpenThreads
 +   debug osgDB${CMAKE_DEBUG_POSTFIX}
 +   optimized osgDB
 +)
  
  ADD_EXECUTABLE(osgpangoguiviewer osgpangoguiviewer.cpp)
  
 ___
 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] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jean-Sébastien Guay

Hi Jeremy,


Ah thanks. :) I had changed so much in osgPango without committing I had
to do the initial patch by hand (though I prefer that way anyways so I
can see what's going on. :)) Looks like I missed some.


No problem, yeah there were quite a bit of changes in osgPango... 
Thankfully I just used your files directly and the merges were good. So 
with these last changes osgCairo and osgPango both build and run on 
Windows :-)


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Picking on billboards

2008-11-12 Thread Vincent Bourdier
So, I've tested on OSG 2.7.5... and it not seems working... picking
billboard do nothing else piking the node behind the billboard(s)
...

Any proposition/idea ?

Thanks.

Regards,
   Vincent

2008/11/12 Vincent Bourdier [EMAIL PROTECTED]

 Hi Robert,

 Okay I will try the 2.7.5 directly theses days.
 I'll give you feedback.

 Thanks
Vincent.

 2008/11/12 Robert Osfield [EMAIL PROTECTED]

 Hi Vincent,

 Could you try the svn/trunk or 2.7.4 release as this has a fix in
 IntersectionVisitor.cpp for billboards.

 Robert.

 On Wed, Nov 12, 2008 at 10:29 AM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  Hi All,
 
  I've seen an old post on picking billboards :
  http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/32123
 
  But with OSG 2.6.1, I still cannot pick a billbord. The first
 intersected
  node returned is the node behind the billboard...
  Does it have been implemented as predicted ?
 
  thanks.
 
  Regards
 Vincent.
 
  ___
  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] Introducing osgpdf

2008-11-12 Thread Tomlinson, Gordon
Very cool Robert 


Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival 
- Master Tambo Tetsura

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Wednesday, November 12, 2008 10:10 AM
To: OpenSceneGraph Users
Subject: [osg-users] Introducing osgpdf

Another day, another curious example... osgpdf ;-)

In a similar vain to my work on adding vnc support that I did last week,
the volume rendering project also has a need for viewing pdf documents
as a way of mixing presentation text/imagery with 3D volumes so no I've
embarked on adding pdf support directly into the core OSG.
 Last month Jeremy Moles added support for pdf reading to osgCairo so I
knew it was possible, and I also had some code to learn from and
leverage ;-)

So today I embarked on the journey to adding pdf support into the core
OSG.  The first step is just a small example application, but like
osgvnc I plan to distil this down into a plugin so that all applications
can leverage it will little coding effort.  I need to get a bit more
experience with using Poppler/Cairo and also spend a bit more time
thinking about the public interface before I make the plugin, and I'd
also like some feedback from members of the community on how well osgpdf
works at your end.

To compile you'll need to latest OSG from svn/trunk.  Cairo and Poppler
libraries.  These look like they should be available on all the major
platforms, but I've only been able to test under Linux. Once you have
Cairo and Poppler installed re-running CMake should be able to pick up
on Cairo and Poppler and then osgpdf example should compile.  If you get
things working under Windows or OSX could you please write in with what
you had to do to get things installed.

To test osgpdf, simply pass it a pdf document:

  osgpdf mydocument.pdf

Move the mouse of the resulting texture quad and then press 'n' and 'p'
to step to next and previous pages.  You can also run it with multiple
documents at once.

  osgpdf *.pdf

I've just tested this 22 documents and it worked just fine, although
each of quads is a bit small on screen to read without zooming in!

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Tatsuhiro Nishioka
HI there,

Here are the results on iMac late 2006, MacBook Pro late 2006, and MacBook late 
2007.

iMac late 2006: C2D 2.16GHz / 2GB (667MHz PC2-5300) / nVidia GeForce 7300GT 
128MB DDR3:
1) window test: 893; error = Failed to realize GraphicsWindow
2) pbuffer test: 891; error = Failed to realize PixelBuffer
3) texture test: 2410; Exception caught, contexts completed = 0, gl objects 
successfully applied = 2410, error = OpenGL error
4) geometry test: 26.113931 seconds.
5) geometry test: 35.799811 seconds.
6) geometry test: 3.357377 seconds.
7) fbo test: 0.175956 seconds.
8) fbo test: 0.147314 seconds.
9) fbo test: 0.147008 seconds.
Note: I applied a patch to osg::Texture.cpp to force disable 
SGIS_generate_mipmap due to nVidia driver bug.


MacBook Pro late 2006: C2D 2.33GHz / 2GB (667MHz PC2-5300) / ATI Radeon X1600 
256MB DDR3: 
1) window test: 65.055635 seconds
2) pbuffer test: 5.735587 seconds.
3) texture test: 2022; Exception caught, contexts completed = 0, gl objects 
successfully applied = 2022, error = OpenGL error
4) geometry test: 20.808473 seconds.
5) geometry test: 46.161832 seconds.
6) geometry test: 3.084558 seconds.
7) fbo test: 0.127456 seconds.
8) fbo test: 0.129009 seconds.
9) fbo test: 0.128637 seconds.


MacBook late 2007: C2D 2.2GHz / 4GB (667MHz PC2-5300) GMA X3100 144MB shared 
with main mem:
1) window test: 927; Bus Error at new_allocator called from 
osg::BufferObject::discardDeletedBufferObjects  :-(
2) pbuffer test:  6.240102 seconds.
3) texture test: 2005; Exception caught, contexts completed = 0, gl objects 
successfully applied = 2005, error = OpenGL error
4) geometry test: 10.212861 seconds.
5) geometry test: 9.294624 seconds.
6) geometry test: 6.946876 seconds.
7) fbo test: 0.160474 seconds.
8) fbo test: 0.188944 seconds.
9) fbo test: 0.158988 seconds.

The results seems reasonable except test 4 and 5. MacBook is way faster than 
iMac and MacBook Pro on these.
Maybe because of somehow disabled GL_ARB_vertex_shader on MacBook Pro or 
difference in memory size?
Taking a look at osg source code didn't tell me where disabled or skipped 
enabling the extension.

Tat

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


Re: [osg-users] Dynamically changing all textures in a scene

2008-11-12 Thread Linus Hilding
Regarding the option 2:
Post process the rendering back end's osgUtil::StateGraph replacing StateSet 
after the cull traversal has run.
Where would the point of intervention be to get access to the stategraph, in 
order to change the different statesets?

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


Re: [osg-users] Picking on billboards

2008-11-12 Thread Vincent Bourdier
Sorry I have no simple code or small example to give.
Is the billboard picking supposed to be OK with OSG 2.7.5 ?  If it work
somewhere, I will make a simple example or look at my code... If not, I
don't know how to solve it.

Thanks.

Regards,
   Vincent.

2008/11/12 Robert Osfield [EMAIL PROTECTED]

 On Wed, Nov 12, 2008 at 3:16 PM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  So, I've tested on OSG 2.7.5... and it not seems working... picking
  billboard do nothing else piking the node behind the billboard(s)
  ...
 
  Any proposition/idea ?

 Sorry no ideas,  do you have a small example model that reproduces the
 problem?

 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] Introducing osgpdf

2008-11-12 Thread Jeremy Moles
On Wed, 2008-11-12 at 15:10 +, Robert Osfield wrote:
 Another day, another curious example... osgpdf ;-)
 
 In a similar vain to my work on adding vnc support that I did last
 week, the volume rendering project also has a need for viewing pdf
 documents as a way of mixing presentation text/imagery with 3D volumes
 so no I've embarked on adding pdf support directly into the core OSG.
  Last month Jeremy Moles added support for pdf reading to osgCairo so
 I knew it was possible, and I also had some code to learn from and
 leverage ;-)

Your implementation of the CairoImage class is probably right on track
with the simplest, cleanest way of supporting a Cairo surface to draw
on.

We'll need to support (and I'm willing to add this on after you commit
it intially) all of the CAIRO_FORMAT_* args in the real
implementation, but that's not hard--just requires settings the
pixelFormat and whatnot.

 So today I embarked on the journey to adding pdf support into the core
 OSG.  The first step is just a small example application, but like
 osgvnc I plan to distil this down into a plugin so that all
 applications can leverage it will little coding effort.  I need to get
 a bit more experience with using Poppler/Cairo and also spend a bit
 more time thinking about the public interface before I make the
 plugin, and I'd also like some feedback from members of the community
 on how well osgpdf works at your end.
 
 To compile you'll need to latest OSG from svn/trunk.  Cairo and
 Poppler libraries.  These look like they should be available on all
 the major platforms, but I've only been able to test under Linux. Once
 you have Cairo and Poppler installed re-running CMake should be able
 to pick up on Cairo and Poppler and then osgpdf example should
 compile.  If you get things working under Windows or OSX could you
 please write in with what you had to do to get things installed.
 
 To test osgpdf, simply pass it a pdf document:
 
   osgpdf mydocument.pdf

How did you avoid not having to use a fully formed URI? In my code, I
had to use file:/// syntax, or Poppler refused to cooperate. It could be
a library version difference, so we'll need to keep an eye on this...

 Move the mouse of the resulting texture quad and then press 'n' and
 'p' to step to next and previous pages.  You can also run it with
 multiple documents at once.
 
   osgpdf *.pdf
 
 I've just tested this 22 documents and it worked just fine, although
 each of quads is a bit small on screen to read without zooming in!

In the example code I'm using (svn update about 20 mins ago) the
PageHandler object isn't being added to the viewer event handlers...

 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] Dynamically changing all textures in a scene

2008-11-12 Thread Robert Osfield
On Wed, Nov 12, 2008 at 3:27 PM, Linus Hilding [EMAIL PROTECTED] wrote:
 Regarding the option 2:
 Post process the rendering back end's osgUtil::StateGraph replacing StateSet 
 after the cull traversal has run.
 Where would the point of intervention be to get access to the stategraph, in 
 order to change the different statesets?

I'd use a cull callback placed above the subgraph that you want to
control in this way, in the cull callback let the traversal of the
subgraph happen, then afterwards examine the RenderStage and it's
associated StateGraph.

Please note that I haven't actually tried to do anything like this
yet, so the best I can do is roughly point in a couple of directions
that might work out.

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Robert Osfield
Hi Jeremy,

On Wed, Nov 12, 2008 at 3:41 PM, Jeremy Moles [EMAIL PROTECTED] wrote:
 Your implementation of the CairoImage class is probably right on track
 with the simplest, cleanest way of supporting a Cairo surface to draw
 on.

CairoImage is just an experiment so far.  I went for the absolute
minimum glue code, which actually is tiny, thumbs up to the Cairo for
being so simple to integrate.

My thought is that if CairoImage looks like a good base then we could
provide it with osgWidget, either with optional compilation of the
implementation in the src/osgWidget directory, or just having the
class interface and implementation all in the header.  The later
approach would mean that osgWidget itself needn't compile against
Cairo at all - it'd only be the utilities/plugins that require it that
would include the header and there fore require Cairo.  A third but
more complex approach would be to have the implementation of
CairoImage loaded as a plugin, the complexity is something I'd rather
avoid though.

 We'll need to support (and I'm willing to add this on after you commit
 it intially) all of the CAIRO_FORMAT_* args in the real
 implementation, but that's not hard--just requires settings the
 pixelFormat and whatnot.

Would this mean adding a format parameter into the existing create()
method that I have written and having a map between CAIRO_FORMAT and
OSG_FORMAT.   At what times is the RGBA format not appropriate?

 How did you avoid not having to use a fully formed URI? In my code, I
 had to use file:/// syntax, or Poppler refused to cooperate. It could be
 a library version difference, so we'll need to keep an eye on this...

This same uri problem bit me too.  Have a look at the code and you
find that I use osgDB::getRealPath() to get the absolut path of the
file, then I prepend file: to create the final uri with seems to
work fine - so far.   It'll be interesting to see what happens under
Windows.

 In the example code I'm using (svn update about 20 mins ago) the
 PageHandler object isn't being added to the viewer event handlers...

PageHandler isn't use right now and incomplete so is not used.  The
code is just experimental, me hope right now is to find out whether it
works across platforms.  Once I get more feedback and have a bit more
time to reflect on the needs of the interface and implementation I'll
refactor the PDF support to clean it up, at this time the osgpdf
example can become a bit more refined too.

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


[osg-users] DatabasePager question ...

2008-11-12 Thread Adrian Egli OpenSceneGraph (3D)
Hi all ,

One of our application is working with a derrived class of database pager.
Our class has just over written
::requestNodeFile(const std::string inFileName,osg::Group* group, float
priority, const osg::FrameStamp* framestamp,osg::ref_ptrosg::Referenced
databaseRequest)
method. There we get a request form osgDB core (osgUtil::cull visitor) and
we generate a event to generate the right tile from a database. the event
gets handled in a second thread, once he has finish
generating the right tile, we insert the information into a list. once a
requested tile is in a liste we can make use of the common database pager
requestnodefile method. so we just call
DatabasePager::requestNodeFile(inFileName,group,priority,framestamp,databaseRequest);
so it seams to work, but unfortunatelly there are
in some cases missing requestnodefile calls, means the database pager should
still have such missing tiles, but i don't get right informed, or the
database pager doesn't page in the tiles, may there is
something wrong with the framestamp. or is there something implement to give
a maximum of time to page in a tile. ? after such a time slot there will no
longer paged in the requested tile. ?

adrian

-- 

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Jean-Sébastien Guay

Hi Robert,


Looks like the vista drivers are doing much better on window/pbuffer
and fbo allocation.


Here are my results, Core 2 Quad 2.4GHz, 3GB memory, NVidia 9800GTX+, 
Vista SP1, Driver 178.13


_
1) osgmemorytest --window -c 1000

At 112 I started getting

Windows Error #3221684230: [Screen #0] 
GraphicsWindowWin32::makeCurrentImplementation() - Unable to set current 
OpenGL rendering context


and at 118 osgmemorytest crashed without error.
_
2) osgmemorytest --pbuffer -c 1000

At 511 osgmemorytest crashed without error. It also seemed to go 
progressively slower as the number of contexts increased.

_
3) osgmemorytest --texture 256 256 -g 1

Exception caught, contexts completed = 0, gl objects successfully 
applied = 0

_
4) osgmemorytest --geometry 32 32 -g 1

Successful completion, contexts created = 1, gl objects applied = 1
Duration = 6.437845 seconds.
_
5) osgmemorytest --geometry-vbo 32 32 -g 1

Successful completion, contexts created = 1, gl objects applied = 1
Duration = 2.778244 seconds.
_
6) osgmemorytest --geometry-va 32 32 -g 1

Successful completion, contexts created = 1, gl objects applied = 1
Duration = 2.219852 seconds.
_
7) osgmemorytest --fbo 256 256 -g 1000

Successful completion, contexts created = 1, gl objects applied = 1000
Duration = 5.969569 seconds.

(also seemed to get slower as the number increased, but my main memory 
never filled up)

_
8) osgmemorytest --fbo 1024 1024 -g 1000

Quickly filled my main memory, but kept on going until 932 when I got:

Warning: detected OpenGL error 'out of memory' after applying attribute 
FrameBufferObject 02ABAF00


Exception caught, contexts completed = 0, gl objects successfully 
applied = 932, error = OpenGL error

_
9) osgmemorytest --fbo 2048 2048 -g 1000

Once again, quickly filled my main memory, but kept on going until 190 
when I got:


Warning: detected OpenGL error 'out of memory' after applying attribute 
FrameBufferObject 028A7E88


Exception caught, contexts completed = 0, gl objects successfully 
applied = 190, error = OpenGL error

_


Seems to shine a bit less on the windows and FBO front than Christophe's 
results. Maybe driver differences? (my driver is a beta, not an official 
WHQL release)


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Introducing osgpdf

2008-11-12 Thread Jean-Sébastien Guay

Hi Robert,


If you get things working under Windows or OSX could you
please write in with what you had to do to get things installed.


I'm working on it. I've got Cairo from the gtk+-bundle:

http://www.gtk.org/download-windows.html

Not sure about Poppler. It seems to only be available as source, and not 
sure if/how it will compile on Windows. I'm looking into that.


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Introducing osgpdf

2008-11-12 Thread Jeremy Moles
On Wed, 2008-11-12 at 16:02 +, Robert Osfield wrote:
 Hi Jeremy,
 
 On Wed, Nov 12, 2008 at 3:41 PM, Jeremy Moles [EMAIL PROTECTED] wrote:
  Your implementation of the CairoImage class is probably right on track
  with the simplest, cleanest way of supporting a Cairo surface to draw
  on.
 
 CairoImage is just an experiment so far.  I went for the absolute
 minimum glue code, which actually is tiny, thumbs up to the Cairo for
 being so simple to integrate.
 
 My thought is that if CairoImage looks like a good base then we could
 provide it with osgWidget, either with optional compilation of the
 implementation in the src/osgWidget directory, or just having the
 class interface and implementation all in the header.  The later

The end-user will want to get the cairo_context_t* for their own use, so
there would be no way to only include the cairo headers in the source
files. Looks like we'd have to use some conditional compilation in both
the headers and the source (but it will still be clean, I think).

 approach would mean that osgWidget itself needn't compile against
 Cairo at all - it'd only be the utilities/plugins that require it that
 would include the header and there fore require Cairo.  A third but
 more complex approach would be to have the implementation of
 CairoImage loaded as a plugin, the complexity is something I'd rather
 avoid though.
 
  We'll need to support (and I'm willing to add this on after you commit
  it intially) all of the CAIRO_FORMAT_* args in the real
  implementation, but that's not hard--just requires settings the
  pixelFormat and whatnot.
 
 Would this mean adding a format parameter into the existing create()
 method that I have written and having a map between CAIRO_FORMAT and
 OSG_FORMAT.   At what times is the RGBA format not appropriate?

Well, in OpenGL there are to main formats I envision many of us wanting
to use:

- ARGB32 (GL_RGBA)
- A8 (GL_ALPHA)

A8 is really helpful because it allows you to create small, compact
alpha masks (maybe I'm using the wrong term here) for texturing. For
example, in osgPango I use CAIRO_FORMAT_A8 to render just the alpha
values for the font glyph, and later a osg::TexEnvCombine() object
(courtesy of Cedric) comes along and sets the actual color. This reduces
the texture memory size by 75%, since the RGB information is fully
irrelevant inside the Cairo texture.

I don't know if you agree with me here, but once people learn about the
cool 2D stuff they can actually do with Cairo, I imagine many more
people will be interested!

  How did you avoid not having to use a fully formed URI? In my code, I
  had to use file:/// syntax, or Poppler refused to cooperate. It could be
  a library version difference, so we'll need to keep an eye on this...
 
 This same uri problem bit me too.  Have a look at the code and you
 find that I use osgDB::getRealPath() to get the absolut path of the
 file, then I prepend file: to create the final uri with seems to
 work fine - so far.   It'll be interesting to see what happens under
 Windows.
 
  In the example code I'm using (svn update about 20 mins ago) the
  PageHandler object isn't being added to the viewer event handlers...
 
 PageHandler isn't use right now and incomplete so is not used.  The
 code is just experimental, me hope right now is to find out whether it
 works across platforms.  Once I get more feedback and have a bit more
 time to reflect on the needs of the interface and implementation I'll
 refactor the PDF support to clean it up, at this time the osgpdf
 example can become a bit more refined too.
 
 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] osg Collada Plugin

2008-11-12 Thread David Spilling
Steffen,

Are you still going via collada? Unfortunately I know nothing about the
Collada import route and how it handles lights defined in a model file.

Does the same thing happen with only one light? I suspect that OpenGL is
just (correctly) adding up all the contributions from the various lights you
have and consequently saturating the output.

David

2008/11/12 Steffen B. [EMAIL PROTECTED]

  Hi,

 i have turned the specular colour to 0 0 0 and it is a bit better.
 But i have another question. In 3ds max i can regulate the ligth intensity
 with the multiplier parameter. do you know how i can regulate the intensity
 with osg?

 thank you for your efforts

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Gerrick Bivins

Is poppler GLP'd? 
Gerrick


On 11/12/08 9:10 AM, Robert Osfield [EMAIL PROTECTED] wrote:

 Another day, another curious example... osgpdf ;-)
 
 In a similar vain to my work on adding vnc support that I did last
 week, the volume rendering project also has a need for viewing pdf
 documents as a way of mixing presentation text/imagery with 3D volumes
 so no I've embarked on adding pdf support directly into the core OSG.
  Last month Jeremy Moles added support for pdf reading to osgCairo so
 I knew it was possible, and I also had some code to learn from and
 leverage ;-)
 
 So today I embarked on the journey to adding pdf support into the core
 OSG.  The first step is just a small example application, but like
 osgvnc I plan to distil this down into a plugin so that all
 applications can leverage it will little coding effort.  I need to get
 a bit more experience with using Poppler/Cairo and also spend a bit
 more time thinking about the public interface before I make the
 plugin, and I'd also like some feedback from members of the community
 on how well osgpdf works at your end.
 
 To compile you'll need to latest OSG from svn/trunk.  Cairo and
 Poppler libraries.  These look like they should be available on all
 the major platforms, but I've only been able to test under Linux. Once
 you have Cairo and Poppler installed re-running CMake should be able
 to pick up on Cairo and Poppler and then osgpdf example should
 compile.  If you get things working under Windows or OSX could you
 please write in with what you had to do to get things installed.
 
 To test osgpdf, simply pass it a pdf document:
 
   osgpdf mydocument.pdf
 
 Move the mouse of the resulting texture quad and then press 'n' and
 'p' to step to next and previous pages.  You can also run it with
 multiple documents at once.
 
   osgpdf *.pdf
 
 I've just tested this 22 documents and it worked just fine, although
 each of quads is a bit small on screen to read without zooming in!
 
 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] Coupling luabind with OSG + Bullet

2008-11-12 Thread Dusten Sobotta
I've used a temporary variable in the global scope as you suggested, and it
still crashes my engine.  Not sure how else to go about this..

On Wed, Nov 12, 2008 at 3:27 AM, Gerwin de Haan [EMAIL PROTECTED]wrote:

 I don't use Luabind either but osgswig with Python instead. I sometimes
 experience similar surprising effects when passing non-declared variables as
 function arguments. In that case, the reason for this is often that the
 scripting language garbage collector deletes the Vec3f after returning from
 the function, essentially leaving any references to the Vec3 dangling. A
 correct reference counting mechanism in the scripting binding should prevent
 this in most cases.

 The problem you're describing could have similar cause. So just to be sure,
 try and define the Vec3f in the global scope and pass a reference as an
 argument in your call.:
 myvec= Vec3f(2,0,0)
 entMan:createStaticEntity( ball, myvec, false )
 Or, in this function, try and make a copy of the parameter values before
 returning.

 regards,
 Gerwin


 On Wed, Nov 12, 2008 at 8:14 AM, Dusten Sobotta [EMAIL PROTECTED]wrote:

 Hello,

 I've been working on an engine that combines sdl, osg, bullet, open al,
 and now lua for roughly 6 weeks.  Static and dynamic entity creation works
 well on the fly if handled with C++ code, however if I attempt to off-load
 this logic to lua, I run into problems.  Below is an example of code that is
 relevant to the problem:

 
 void entityManager::loadStaticEntityList( const std::string filename ) {

 lua_State *L = lua_open();
 luabind::open(L);

 luabind::module( L ) [

 luabind::class_osg::Vec3f(Vec3f)
 .def( luabind::constructor float, float, float () )
 ];

 luabind::module( L ) [

 luabind::class_entityManager(entityManager)
 .def( luabind::constructor () )
 .def( createStaticEntity, entityManager::createStaticEntity )
 .def(destroyAllEntities, entityManager::destroyAllEntities )
 ];


 if( luaL_loadfile( L, filename.c_str() ) || lua_pcall( L, 0, 0, 0 ) )
 throw could not load entity list;


 createStaticEntity( ball, osg::Vec3f( 0, 0, 0 ), false ); //direct
 C++ call; works!

 luaL_dofile( L, filename.c_str() );

 }
 ///

 ///
 void entityManager::createStaticEntity( const std::string type, const
 osg::Vec3f position, const bool dimension ) {

 entity * newEntity = createEntityP( type, position, dimension );
 _physicsManager-defineRigidBody( newEntity, type, false, dimension );

 entities[ newEntity-getRigidBody() ] = newEntity;
 staticEntities[ dimension ]-addChild( newEntity-getPAT().get() );
 staticEntityList.push_back( newEntity );
 }
 ///

 And here is the lua script I'm trying to run:

 --
 entMan = entityManager()
 a = Vec3f( 0, 0, 0 )

 --same call from within lua; crashes the engine if uncommented!
 entMan:createStaticEntity( ball, Vec3f( 2, 0, 0 ), false )
 --


 As you can see, a declaration of type Vec3f works from within lua, so I
 don't think that using Vec3f as a parameter is an issue.
 Might anyone know what's going on here?  I'm not very familiar with
 luabind, and even less familiar with getting it to play nicely with OSG.
 Any help would be greatly appreciated.



 Thanks for your time,

 Dusten

 ___
 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] Introducing osgpdf

2008-11-12 Thread Robert Osfield
Hi Jeremy,

On Wed, Nov 12, 2008 at 4:21 PM, Jeremy Moles [EMAIL PROTECTED] wrote:
 Well, in OpenGL there are to main formats I envision many of us wanting
 to use:

- ARGB32 (GL_RGBA)
- A8 (GL_ALPHA)

 A8 is really helpful because it allows you to create small, compact
 alpha masks (maybe I'm using the wrong term here) for texturing. For
 example, in osgPango I use CAIRO_FORMAT_A8 to render just the alpha
 values for the font glyph, and later a osg::TexEnvCombine() object
 (courtesy of Cedric) comes along and sets the actual color. This reduces
 the texture memory size by 75%, since the RGB information is fully
 irrelevant inside the Cairo texture.

Thanks for the explanation.  I can certainly see A8 being useful, as
well a straight RGB.

Out of curiosity Is the an A16 format?

 I don't know if you agree with me here, but once people learn about the
 cool 2D stuff they can actually do with Cairo, I imagine many more
 people will be interested!

I'm very curious where it'll all take us.  It's certainly is nice link
into a whole set of tools that we don't normally get access to in the
pure 3D world.

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Gerrick Bivins
I meant:
Is poppler GPL'd as in it's license.
;)
Gerrick


On 11/12/08 10:31 AM, Gerrick Bivins [EMAIL PROTECTED] wrote:

 
 Is poppler GLP'd?
 Gerrick
 
 
 On 11/12/08 9:10 AM, Robert Osfield [EMAIL PROTECTED] wrote:
 
 Another day, another curious example... osgpdf ;-)
 
 In a similar vain to my work on adding vnc support that I did last
 week, the volume rendering project also has a need for viewing pdf
 documents as a way of mixing presentation text/imagery with 3D volumes
 so no I've embarked on adding pdf support directly into the core OSG.
  Last month Jeremy Moles added support for pdf reading to osgCairo so
 I knew it was possible, and I also had some code to learn from and
 leverage ;-)
 
 So today I embarked on the journey to adding pdf support into the core
 OSG.  The first step is just a small example application, but like
 osgvnc I plan to distil this down into a plugin so that all
 applications can leverage it will little coding effort.  I need to get
 a bit more experience with using Poppler/Cairo and also spend a bit
 more time thinking about the public interface before I make the
 plugin, and I'd also like some feedback from members of the community
 on how well osgpdf works at your end.
 
 To compile you'll need to latest OSG from svn/trunk.  Cairo and
 Poppler libraries.  These look like they should be available on all
 the major platforms, but I've only been able to test under Linux. Once
 you have Cairo and Poppler installed re-running CMake should be able
 to pick up on Cairo and Poppler and then osgpdf example should
 compile.  If you get things working under Windows or OSX could you
 please write in with what you had to do to get things installed.
 
 To test osgpdf, simply pass it a pdf document:
 
   osgpdf mydocument.pdf
 
 Move the mouse of the resulting texture quad and then press 'n' and
 'p' to step to next and previous pages.  You can also run it with
 multiple documents at once.
 
   osgpdf *.pdf
 
 I've just tested this 22 documents and it worked just fine, although
 each of quads is a bit small on screen to read without zooming in!
 
 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] how to add shader to osgcal node

2008-11-12 Thread yang zhiyuan
Hi:
I am trying to add shader to osgcal node.
I do it like this:

   osgCal::CoreModel *core = new osgCal::CoreModel(dummy);
 load(core); // loading some data into it
 // Creating a concrete model using the core template
 osgCal::Model *model = new osgCal::Model();
 model-create(core);
 osgCal::Model *model_2 = new osgCal::Model();
 model_2-create(core);
 //osgCal::Model *model = new osgCal::Model(core);
 // Setting the first animation in loop mode, weight 1, and starting just
now
 model-startLoop(0, 1.0f, 0.0f);
 model_2-startLoop(1, 1.0f, 0.0f);
 model_2-setTimeScale(1.5f);
 osg::ref_ptrosg::Group escena = new osg::Group();
 escena-addChild(model);
 escena-addChild(model_2);
osg::StateSet* stateSet = escena-getOrCreateStateSet();
osg::Program* program= new osg::Program;
osg::Shader*   shader = new osg::Shader(osg::Shader::VETEXT);
...

the problem is the shander does not apply to the osg node,is there any other
way to add shader to osgcal node?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] crash withmultimonitormultithreadnVIDIAworkaroundenabled

2008-11-12 Thread Robert Osfield
Hi Wojtek  Marco,

Could you one of your guys implement that original workaround as a
runtime optional flag in GraphicsWindowWin32, with an env var settings
it's default value.  I'd suggest that this workaround is now to set
off.

Wojtek, do you know what driver version numbers were affected by the
original problem?  I'm wondering if this variable could be set
automatically based on detecting the NVidia driver.

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


Re: [osg-users] Dynamically changing all textures in a scene

2008-11-12 Thread David Spilling
The osg Depictions thread is here :
http://www.mail-archive.com/[EMAIL PROTECTED]/msg10685.html

Ok, switching every stateset would be what I am looking to do. Composing the
 texture in the shader would mean we loose the desired ability to use image
 files.


Agreed, but if your model had (for example) tex unit 0 = daylight view, tex
unit 1 = infrared view, you could set a uniform at top level which would be
propagated down into all your shaders, where they could use it to determine
which tex lookup to do. Of course, this might mean that you need a coherent
shader management policy for all your models and shaders...

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


Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?

2008-11-12 Thread Stephen H. Westin

Argentieri, John-P63223 wrote:

Paul,
 
I'm not sure what the problem is, but I can see that when I create a 
scene graph with ProxyNodes in memory, and write that scene graph to 
an OpenFlight file using 2.6.1, the external references are somhow 
broken with respect to textures.
If you send me a (reasonably small) set of FLT files, I can take a look 
and perhaps get a bit more specific

than somehow broken.

We have many assets in OpenFlight format, so I perforce have learned 
some of the internals and built

a few tools to peer inside.

--
Stephen H. Westin
Software Engineer
Doron Precision Systems, Inc.
P. O. Box 400
Binghamton, NY 13902-0400

[EMAIL PROTECTED]

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


Re: [osg-users] DatabasePager question ...

2008-11-12 Thread Lionel Lagarde




Hi, 

the osgDB::DatabasePager discards a database request if its frameNumber
is earlier
than the current frameNumber. Your requestNodeFile method has to
continuously
call osgDB::requestNodeFile even if the tile has already been requested.


Adrian Egli OpenSceneGraph (3D) wrote:
Hi all , 
  
One of our application is working with a derrived class of database
pager. Our class has just over written 
::requestNodeFile(const std::string inFileName,osg::Group* group,
float priority, const osg::FrameStamp*
framestamp,osg::ref_ptrosg::Referenced databaseRequest) 
method. There we get a request form osgDB core (osgUtil::cull visitor)
and we generate a event to generate the right tile from a database. the
event gets handled in a second thread, once he has finish 
generating the right tile, we insert the information into a list. once
a requested tile is in a liste we can make use of the common database
pager 
requestnodefile method. so we just call
DatabasePager::requestNodeFile(inFileName,group,priority,framestamp,databaseRequest);
so it seams to work, but unfortunatelly there are 
in some cases missing requestnodefile calls, means the database pager
should still have such missing tiles, but i don't get right informed,
or the database pager doesn't page in the tiles, may there is
something wrong with the framestamp. or is there something implement to
give a maximum of time to page in a tile. ? after such a time slot
there will no longer paged in the requested tile. ? 
  
adrian 
  
-- 

Adrian Egli
  

___
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] Dynamically changing all textures in a scene

2008-11-12 Thread Linus Hilding
Hi, I would appreciate some advice on how to best use the osg functionality, in 
order to be able to dynamically change every single texture in a scene, 
depending on the view. Every view in the scene should have the possibility to 
either use original textures or alternative (infrared) versions. An approach 
where we do not have to use switches between duplicate scenes would be 
preferred. Greatful for any ideas.
Regards,
Linus Hilding
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] crash withmultimonitormultithreadnVIDIAworkaround enabled

2008-11-12 Thread Marco Jez

Hi Wojtek,

your test case behaves exactly as osgViewer does. The app crashes when 
wglMakeCurrent() gets called for the second time. Setting repeatMakeCurrent 
to 0 fixes the crash.
One thing I forgot to say, is that it doesn't always crash: the 
success/failure ratio is about 1 to 15. This applies to both osgViewer and 
your test program.
Also, it seems that forcing the multithreaded optimization option to 
enabled in the nVIDIA Control Panel (it defaulted to automatic in my 
driver) makes things work. I still consider this a driver bug, however, 
because leaving an optional optimization to its default value should never 
crash applications.


Marco


--
From: Wojciech Lewandowski [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2008 11:42 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] crash withmultimonitormultithreadnVIDIAworkaround 
enabled



Hi Marco,

Here it is. My server does not like sending exectuables. I hope You don't
mind VS 9.0 source  solution.

Example is as simple as multithreaded opengl example can be. WindowOGL 
class

does initlaization in one thread and rendering in the other thread. Its
repeatMakeCurrent variable is set to 1 by default which means that each
makeCurrentContext will be repeated once.  So if everything goes exactly
like with osgViewer it should the crash there. If you find that example
works, try runing with repeatMakeCurrent set to 0 and check if the screen 
is

all green (does not display red triangle). Red triangle would mean that
drivers have remained broken.

Thanks a lot.
Wojtek Lewandowski



Thanks, Marco.

I will send this code tomorrow from my office. I don't have it at home.

Cheers,
Wojtek

Hi Wojtek,


Its really weird. I am pretty much sure we have tested this with Vista
x64,
but maybe not the latest drivers. May I send you simpified OpenGL only
repro
I have sent to NVidia as a bug report ? I am curious if the crash will
happen with it as well ?


Sure, I'm glad to help.

Marco


___
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] crashwithmultimonitormultithreadnVIDIAworkaroundenabled

2008-11-12 Thread Wojciech Lewandowski

Hi Robert,


Could you one of your guys implement that original workaround as a
runtime optional flag in GraphicsWindowWin32, with an env var settings
it's default value.  I'd suggest that this workaround is now to set
off.


I will see what I can do.


Wojtek, do you know what driver version numbers were affected by the
original problem?  I'm wondering if this variable could be set
automatically based on detecting the NVidia driver.


I assume its what Marco reported: 178.24 with Vista x64 and GeForce GT 8800. 
I don't have this board and could not repeat the bug with GTX 280.


I have no idea how to read Driver version. I don't know if such string is 
available in OpenGL. I had this problem earlier before adding the workaround 
and we made it without driver checks.


Wojtek


___
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] Dynamically changing all textures in a scene

2008-11-12 Thread Linus Hilding
Ok, switching every stateset would be what I am looking to do. Composing the 
texture in the shader would mean we loose the desired ability to use image 
files.

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Robert Osfield
Hi J-S and all Windows developers,

I have reviewed the revisions of osgconv to track down the changes
that were made to get around the same issue with lack of
Win32WindowSystem automatic registration and it looks like Windows/VS
won't link in a lib unless you use a symbol from it.  The workaround
in osgconv was to call osgViewerGetVersion() so I've added this to
osgmemorytest and checked it in.

So... could windows users do an svn update and let us know what results you get.

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Robert Osfield
Hi Pasquale,

On Wed, Nov 12, 2008 at 12:20 AM, Pasquale Tricarico [EMAIL PROTECTED] wrote:
 Thank you Robert for this nice tool. Before I report my results, my
 feature requests ;)

I will be adding more features to osgmemorytest, but... please
remember you have all the source code so you are able to dive in and
add the features you'd like to see.

 So, for tests 3) to 6) I had to replace -g with -c to perform all
 10,000 tests...

 Not sure why these differ quite a lot from others... Power of Quadro? :)

This is a bit odd.  -c 1 would imply that it'll create 10,000
graphics contexts and use the default -g setting of 1000. So you
really aren't doing quite the same test..

How large a value of -g can you use before errors?

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Robert Osfield
Hi Christophe,

Looks like the vista drivers are doing much better on window/pbuffer
and fbo allocation.  There is clearly a bug on the NVidia linux
drivers w.r.t fbo's that we need to take up with NVidia.

The exception on the texture allocation is concerning, could you run
it in a debugger and found out what the stack trace is.

Robert.

On Wed, Nov 12, 2008 at 11:49 AM, christophe loustaunau
[EMAIL PROTECTED] wrote:
 Hi Robert,

 Things works better on windows now, here's my results :

 Machine: windows vista, Intel Core 2, 3GB, Gefore 640Mb 8800GTS
 driver 169.06

 1) window test: get 492 windows opened before failure.
 2) pbuffer test:  get 504 pbuffers opened before failure.
 3) texture test: failed
 Exception caught, contexts completed = 0, gl objects successfully applied =
 0
 4) geometry test: all 10,000 geometries allocated and download to
 OpenGL in 6.7 seconds
 5) geometry test: all 10,000 geometries allocated and download to
 OpenGL in 3.0 seconds
 6) geometry test: all 10,000 geometries allocated and download to
 OpenGL in 2.0 seconds
 7) fbo test: all 1000 fbo's created in 5.7 seconds.
 8) fbo test: all 1000 fbo's created in 175 seconds.
 9) fbo test: 617 fbo's created before failure.

 Regards.

 --
 Christophe Loustaunau.

 On Wed, Nov 12, 2008 at 11:40 AM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi J-S and all Windows developers,

 I have reviewed the revisions of osgconv to track down the changes
 that were made to get around the same issue with lack of
 Win32WindowSystem automatic registration and it looks like Windows/VS
 won't link in a lib unless you use a symbol from it.  The workaround
 in osgconv was to call osgViewerGetVersion() so I've added this to
 osgmemorytest and checked it in.

 So... could windows users do an svn update and let us know what results
 you get.

 Thanks,
 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] Introducing osgmemorytest

2008-11-12 Thread christophe loustaunau
Hi Robert,

Things works better on windows now, here's my results :

Machine: windows vista, Intel Core 2, 3GB, Gefore 640Mb 8800GTS
driver 169.06

1) window test: get 492 windows opened before failure.
2) pbuffer test:  get 504 pbuffers opened before failure.
3) texture test: failed
Exception caught, contexts completed = 0, gl objects successfully applied =
0
4) geometry test: all 10,000 geometries allocated and download to
OpenGL in 6.7 seconds
5) geometry test: all 10,000 geometries allocated and download to
OpenGL in 3.0 seconds
6) geometry test: all 10,000 geometries allocated and download to
OpenGL in 2.0 seconds
7) fbo test: all 1000 fbo's created in 5.7 seconds.
8) fbo test: all 1000 fbo's created in 175 seconds.
9) fbo test: 617 fbo's created before failure.

Regards.

-- 
Christophe Loustaunau.

On Wed, Nov 12, 2008 at 11:40 AM, Robert Osfield
[EMAIL PROTECTED]wrote:

 Hi J-S and all Windows developers,

 I have reviewed the revisions of osgconv to track down the changes
 that were made to get around the same issue with lack of
 Win32WindowSystem automatic registration and it looks like Windows/VS
 won't link in a lib unless you use a symbol from it.  The workaround
 in osgconv was to call osgViewerGetVersion() so I've added this to
 osgmemorytest and checked it in.

 So... could windows users do an svn update and let us know what results you
 get.

 Thanks,
 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] Picking on billboards

2008-11-12 Thread Vincent Bourdier
Hi All,

I've seen an old post on picking billboards :
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/32123

But with OSG 2.6.1, I still cannot pick a billbord. The first intersected
node returned is the node behind the billboard...
Does it have been implemented as predicted ?

thanks.

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


Re: [osg-users] how to add shader to osgcal node

2008-11-12 Thread Brian R Hill
A problem you'll have is that the osgcal model has it's own shaders applied
down at the geometry level. These will override the one's you are applying
further up the graph.

Brian

[EMAIL PROTECTED] wrote: -

To: osg-users@lists.openscenegraph.org
From: yang zhiyuan [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
Date: 11/12/2008 08:49AM
Subject: [osg-users] how to add shader to osgcal node

Hi:

I am trying to add shader to osgcal node.

I do it like this:



   osgCal::CoreModel *core = new osgCal::CoreModel(dummy);
 load(core); // loading some data into it
 // Creating a concrete model using the core template

 osgCal::Model *model = new osgCal::Model();
 model-create(core);

 osgCal::Model *model_2 = new osgCal::Model();
 model_2-create(core);

 //osgCal::Model *model = new osgCal::Model(core);

 // Setting the first animation in loop mode, weight 1, and starting just
 now
 model-startLoop(0, 1.0f, 0.0f);
 model_2-startLoop(1, 1.0f, 0.0f);

 model_2-setTimeScale(1.5f);

 osg::ref_ptrosg::Group escena = new osg::Group();
 escena-addChild(model);
 escena-addChild(model_2);

osg::StateSet* stateSet = escena-getOrCreateStateSet();

osg::Program* program= new osg::Program;

osg::Shader*   shader = new osg::Shader(osg::Shader::VETEXT);

...



the problem is the shander does not apply to the osg node,is there any
other way to add shader to osgcal node?

___
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] Introducing osgpdf

2008-11-12 Thread Jean-Sébastien Guay

Hi again,


If you get things working under Windows or OSX could you
please write in with what you had to do to get things installed.


I'm working on it. I've got Cairo from the gtk+-bundle:

http://www.gtk.org/download-windows.html

Not sure about Poppler. It seems to only be available as source, and not 
sure if/how it will compile on Windows. I'm looking into that.


I found binaries for Poppler here:

http://www.gimp.org/~tml/gimp/win32/downloads.html

but they were not compiled with POPPLER_HAS_CAIRO defined, so they don't 
have the poppler_page_render() function... I'll have to find something else.


One thing, I think you need to move the test for Poppler from the 
examples/osgpdf/CMakeLists.txt to the base CMakeLists.txt, otherwise 
POPPLER_FOUND can never be true when adding the osgpdf example in 
examples/CMakeLists.txt (or at least, it wasn't for me until I moved it).


I'll keep you posted on my progress (if any).

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] Picking on billboards

2008-11-12 Thread Robert Osfield
Hi Vincent,

Could you try the svn/trunk or 2.7.4 release as this has a fix in
IntersectionVisitor.cpp for billboards.

Robert.

On Wed, Nov 12, 2008 at 10:29 AM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hi All,

 I've seen an old post on picking billboards :
 http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/32123

 But with OSG 2.6.1, I still cannot pick a billbord. The first intersected
 node returned is the node behind the billboard...
 Does it have been implemented as predicted ?

 thanks.

 Regards
Vincent.

 ___
 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] Dynamically changing all textures in a scene

2008-11-12 Thread Smeenk, R.J.M. (Roland)

A long long time ago somebody posted source code for osgDepictions,
which allows you to do a texture/stateset switch for a complete scene. I
could not find it in the mailing list archives though...

--
Roland
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Linus Hilding
 Sent: woensdag 12 november 2008 10:55
 To: OpenSceneGraph Users
 Subject: [osg-users] Dynamically changing all textures in a scene
 
 Hi, I would appreciate some advice on how to best use the osg 
 functionality, in order to be able to dynamically change 
 every single texture in a scene, depending on the view. Every 
 view in the scene should have the possibility to either use 
 original textures or alternative (infrared) versions. An 
 approach where we do not have to use switches between 
 duplicate scenes would be preferred. Greatful for any ideas.
 Regards,
 Linus Hilding
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
 
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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Jeremy Moles
On Wed, 2008-11-12 at 16:32 +, Robert Osfield wrote:
 Hi Jeremy,
 
 On Wed, Nov 12, 2008 at 4:21 PM, Jeremy Moles [EMAIL PROTECTED] wrote:
  Well, in OpenGL there are to main formats I envision many of us wanting
  to use:
 
 - ARGB32 (GL_RGBA)
 - A8 (GL_ALPHA)
 
  A8 is really helpful because it allows you to create small, compact
  alpha masks (maybe I'm using the wrong term here) for texturing. For
  example, in osgPango I use CAIRO_FORMAT_A8 to render just the alpha
  values for the font glyph, and later a osg::TexEnvCombine() object
  (courtesy of Cedric) comes along and sets the actual color. This reduces
  the texture memory size by 75%, since the RGB information is fully
  irrelevant inside the Cairo texture.
 
 Thanks for the explanation.  I can certainly see A8 being useful, as
 well a straight RGB.

Yeah, there is a RGB24 format as well--alas, it packs itself using 32
bits and just ignores the alpha byte. However, ARGB32 stores
pre-multiplied alpha, so RGB24 could still be useful.

 Out of curiosity Is the an A16 format?

Unfortunately, no.

  I don't know if you agree with me here, but once people learn about the
  cool 2D stuff they can actually do with Cairo, I imagine many more
  people will be interested!
 
 I'm very curious where it'll all take us.  It's certainly is nice link
 into a whole set of tools that we don't normally get access to in the
 pure 3D world.
 
 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] Dynamically changing all textures in a scene

2008-11-12 Thread Robert Osfield
Hi Linus,

On Wed, Nov 12, 2008 at 10:30 AM, Linus Hilding [EMAIL PROTECTED] wrote:
 Ok, switching every stateset would be what I am looking to do. Composing the 
 texture in the shader would mean we loose the desired ability to use image 
 files.

StateSet remapping is what you'd probably best using.  The two ways
I'd go about this would be either :

 1) Extend CullVisitor so that the CullVisitor::pushStateSet(const
osg::StateSet* ss) method checks a local
 std::mapStateSet*, StateSet* and does the remap.  This map
would be populated via a cull callback.

 Such a change might be best pushed into the core OSG as a new feature.

  2) Post process the rendering back end's osgUtil::StateGraph
replacing StateSet after the cull traversal has run.

Option 2 is the least intrusive of the changes.

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread christophe loustaunau
Hi Robert,


The exception on the texture allocation is concerning, could you run
 it in a debugger and found out what the stack trace is.


Here is the stack trace :

 msvcr80d.dll!_unlock(int locknum=8)  Line 376
 msvcr80d.dll!_unlockexit()  Line 760 + 0x7 bytes
 msvcr80d.dll!_CxxThrowException(void * pExceptionObject=0x00dbf170,
const _s__ThrowInfo * pThrowInfo=0x68fb3300)  Line 161
 msvcr80d.dll!operator new(unsigned int size=262144)  Line 64
 osg50-osgd.dll!operator new[](unsigned int count=262144)  Line 7 + 0x9
bytes
 osg50-osgd.dll!osg::Image::allocateImage(int s=256, int t=256, int r=1,
unsigned int format=6408, unsigned int type=5121, int packing=1)  Line 545 +
0x9 bytes
 osgmemorytestd.exe!TextureTest::allocate()  Line 150 + 0x2e bytes
 osgmemorytestd.exe!main(int argc=2, char * * argv=0x0247c828)  Line 441
+ 0x2d bytes
 osgmemorytestd.exe!__tmainCRTStartup()  Line 597 + 0x19 bytes
 osgmemorytestd.exe!mainCRTStartup()  Line 414

It fails when it try to allocate the data for the new image. It always
happend around the 7781, 7782 or 7783 image.
When it fails in debug 2.74 of my 3.0 Go ram is used .
When it fails in release 0.9 of my 3.0 Go ram is used .

I don't really know what to think about it.


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


Re: [osg-users] Dynamically changing all textures in a scene

2008-11-12 Thread Dusten Sobotta
The proper way to go about this would be using an alternate shader for the
infrared view.  That way you can pull in any source texture (one that is
already mapped on an object), and generate the infrared composite image on
the fly.  For example, if you want all of the walls (and other cold
materials) separated, you can have a unified shader for those objects;
character objects should have some sort of view vector intensity calculation
to have their outlines drift off into 'colder' colors while their insides
remain 'warm'.  Look into gooch shaders for this effect.  Good luck~

On Wed, Nov 12, 2008 at 3:55 AM, Linus Hilding [EMAIL PROTECTED] wrote:

 Hi, I would appreciate some advice on how to best use the osg
 functionality, in order to be able to dynamically change every single
 texture in a scene, depending on the view. Every view in the scene should
 have the possibility to either use original textures or alternative
 (infrared) versions. An approach where we do not have to use switches
 between duplicate scenes would be preferred. Greatful for any ideas.
 Regards,
 Linus Hilding
 ___
 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] DatabasePager question ...

2008-11-12 Thread Robert Osfield
Hi Adrian,

Personally I'd write the code to retrieve the tiles as an OSG plugin
or using a Registry::ReadFileCallback.

The pager now support multiple database reading threads to the latency
between request and when it's loaded needn't be long.  This would
simplify your code significantly and would avoid the need for
subclassing of the DatabasePager.

Robert.

On Wed, Nov 12, 2008 at 4:06 PM, Adrian Egli OpenSceneGraph (3D)
[EMAIL PROTECTED] wrote:
 Hi all ,

 One of our application is working with a derrived class of database pager.
 Our class has just over written
 ::requestNodeFile(const std::string inFileName,osg::Group* group, float
 priority, const osg::FrameStamp* framestamp,osg::ref_ptrosg::Referenced
 databaseRequest)
 method. There we get a request form osgDB core (osgUtil::cull visitor) and
 we generate a event to generate the right tile from a database. the event
 gets handled in a second thread, once he has finish
 generating the right tile, we insert the information into a list. once a
 requested tile is in a liste we can make use of the common database pager
 requestnodefile method. so we just call
 DatabasePager::requestNodeFile(inFileName,group,priority,framestamp,databaseRequest);
 so it seams to work, but unfortunatelly there are
 in some cases missing requestnodefile calls, means the database pager should
 still have such missing tiles, but i don't get right informed, or the
 database pager doesn't page in the tiles, may there is
 something wrong with the framestamp. or is there something implement to give
 a maximum of time to page in a tile. ? after such a time slot there will no
 longer paged in the requested tile. ?

 adrian

 --
 
 Adrian Egli

 ___
 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] BUG FOUND: FLT Writer Duplicate Node Names?

2008-11-12 Thread Paul Martz
John -- Use of polygon offset controls whether the exporter uses subfaces or
not. It might be the case that the subface code has some kind of problem
with texture mapping.
 
One thing you can try is to go into expGeometryRecords.cpp and disable use
of subfaces by commenting out the SubfaceHelper instances at lines 934 and
1023. This will cause incorrect rendering of coplanar polygons, of course,
but if it changes the behavior of your texture mapping issue, then this is a
good indication of where the problem lies.
 
Let me know how it goes.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Tuesday, November 11, 2008 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


Paul,
 
Attached is an example of a bug I found in the FLT writer. If the
GL_POLYGON_OFFSET remains inside of extref.osg, then converting it to FLT
using osgconv will cause the texture of the external reference to disappear.
If the GL_POLYGON_OFFSET is removed from extref.osg, then extref.osg is
converted to FLT using osgconv, the texture on the external reference
remains.
 
Thanks,
John Argentieri

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Tuesday, November 11, 2008 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Guys,
 
Has anyone used the ProxyNode in this way, in OpenFlight files? My primary
file and my externally referenced file are both OpenFlight files. The
externally referenced file gets loaded, but the texture is incorrect. The
texture applied to the model, in my case, is the only one that is used
internally in the primary OpenFlight file. For example, my terrain surface
is internal and textured as grass. My externally reference tree models are
shaped like trees, but also textured in grass. I've tried moving the tree's
texture files around to be sure that it wasn't a path issue. It didn't work.
 
Is there anyone that can help me to resolve the issues I am having? All I
want to do is write an OpenFlight file that contains several clones of
another OpenFlight file. The straightforward approach breaks -- not for the
current OSG loader, but for other loaders that expect node names to be
unique.
 
Your friend,
John Argentieri
 
  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Friday, November 07, 2008 1:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter writes an external reference record when it encounters a
ProxyNode. The importer should do the inverse operation.
 
I searched for the error text you mentioned, but could not find any code in
OSG that displays that error, so I can't really help you with that.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Friday, November 07, 2008 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Paul,
 
Is there a way that I can place multiple instances of an external .flt file
into another .flt file? I'm trying to use ProxyNode, but still getting these
errors:
 
Non primary record found as child. op=19
Non primary record found as child. op=19
Non primary record found as child. op=20
Non primary record found as child. op=20
 
Thanks,
John
 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Friday, November 07, 2008 12:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter dumps the Node name to the FLT record name, just as the
importer does the inverse operation. I don't believe there is any code to
check for and avoid duplicate node names.
 
I'd think it would be up to the application to specify unique Node names, as
the exporter has no other way to know what text should be written to the FLT
record name. I can see how it might be useful to have a I don't care what
you name it, just make sure it's unique mode. Currently, this doesn't
exist. You are welcome to add it.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Friday, November 07, 2008 8:41 AM
To: [EMAIL PROTECTED]
Subject: [osg-users] FLT Writer Duplicate Node Names?


Hello all.
 
Does the FLT writer create duplicate node names for nodes with multiple
transforms as parents? We're having trouble sharing a single model inside of
multiple transforms scattered about. Some older OpenFlight software we are
interfacing to does not like this. Any thoughts guys?
 
Thank you,
John Argentieri 
Software Engineer 
GENERAL DYNAMICS 
C4 Systems 
[EMAIL PROTECTED] 

This email message is for the sole use of the intended recipient(s) and may
contain GDC4S confidential or privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not an

[osg-users] FBO FrameBufferObject and stencil support

2008-11-12 Thread Himar Carmona
Hi,

   i have two question regarding FBO and Stencil buffer. Perhaps someone
could clear my thoughts.

   1) Does OSG 2.6.1 supports FBO with stencil buffer attachment?

   2) Does it supports EXT_PACKED_DEPTH_STENCIL?


Explanation: I use FBO to take the render. Recently i wanted to use stencil
to render concave polygons. But it doesn't work. It seems that i must also
attach the stencil buffer. But don't know exactly how to achieve that and
i'm getting a FBO setup failed (0x8cd6) from runCameraSetup. The graphics
card supports PACKED_DEPTH_STENCIL and it seems i must also attach a depth
buffer but i don't know how.

Now i'm lost and a bit confused with all this mess of buffers. Any help
about it will be really appreciated.

Thanks in advance and best regards
Himar.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] DatabasePager question ...

2008-11-12 Thread Adrian Egli OpenSceneGraph (3D)
Ok i see, so you would append a custum reading thread to the osg database to
avoid subclassing.

/adrian

2008/11/12 Robert Osfield [EMAIL PROTECTED]

 Hi Adrian,

 Personally I'd write the code to retrieve the tiles as an OSG plugin
 or using a Registry::ReadFileCallback.

 The pager now support multiple database reading threads to the latency
 between request and when it's loaded needn't be long.  This would
 simplify your code significantly and would avoid the need for
 subclassing of the DatabasePager.

 Robert.

 On Wed, Nov 12, 2008 at 4:06 PM, Adrian Egli OpenSceneGraph (3D)
 [EMAIL PROTECTED] wrote:
  Hi all ,
 
  One of our application is working with a derrived class of database
 pager.
  Our class has just over written
  ::requestNodeFile(const std::string inFileName,osg::Group* group, float
  priority, const osg::FrameStamp* framestamp,osg::ref_ptrosg::Referenced
  databaseRequest)
  method. There we get a request form osgDB core (osgUtil::cull visitor)
 and
  we generate a event to generate the right tile from a database. the event
  gets handled in a second thread, once he has finish
  generating the right tile, we insert the information into a list. once a
  requested tile is in a liste we can make use of the common database pager
  requestnodefile method. so we just call
 
 DatabasePager::requestNodeFile(inFileName,group,priority,framestamp,databaseRequest);
  so it seams to work, but unfortunatelly there are
  in some cases missing requestnodefile calls, means the database pager
 should
  still have such missing tiles, but i don't get right informed, or the
  database pager doesn't page in the tiles, may there is
  something wrong with the framestamp. or is there something implement to
 give
  a maximum of time to page in a tile. ? after such a time slot there will
 no
  longer paged in the requested tile. ?
 
  adrian
 
  --
  
  Adrian Egli
 
  ___
  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




-- 

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Melchior FRANZ
* Jean-Sébastien Guay -- Wednesday 12 November 2008:
 One thing, I think you need to move the test for Poppler from the 
 examples/osgpdf/CMakeLists.txt to the base CMakeLists.txt, otherwise 
 POPPLER_FOUND can never be true when adding the osgpdf example in 
 examples/CMakeLists.txt (or at least, it wasn't for me until I moved it).

Isn't built here either, probably for that reason, although
poppler  cairo are installed.

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


Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?

2008-11-12 Thread Argentieri, John-P63223
Paul,
 
I tried to do setAttribute( m_pPolygonOffset, osg::StateAttribute::OFF
); but I suppose your code may still be able to detect that the
attribute is present. I forgot there was a removeAttribute. Do you think
it's worth a shot for me to code it up and try again? 
 
Thanks!
John



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Wednesday, November 12, 2008 1:08 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


John -- Use of polygon offset controls whether the exporter uses
subfaces or not. It might be the case that the subface code has some
kind of problem with texture mapping.
 
One thing you can try is to go into expGeometryRecords.cpp and disable
use of subfaces by commenting out the SubfaceHelper instances at lines
934 and 1023. This will cause incorrect rendering of coplanar polygons,
of course, but if it changes the behavior of your texture mapping issue,
then this is a good indication of where the problem lies.
 
Let me know how it goes.
   -Paul
 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Tuesday, November 11, 2008 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node
Names?


Paul,
 
Attached is an example of a bug I found in the FLT writer. If
the GL_POLYGON_OFFSET remains inside of extref.osg, then converting it
to FLT using osgconv will cause the texture of the external reference to
disappear. If the GL_POLYGON_OFFSET is removed from extref.osg, then
extref.osg is converted to FLT using osgconv, the texture on the
external reference remains.
 
Thanks,
John Argentieri



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Tuesday, November 11, 2008 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Guys,
 
Has anyone used the ProxyNode in this way, in OpenFlight files?
My primary file and my externally referenced file are both OpenFlight
files. The externally referenced file gets loaded, but the texture is
incorrect. The texture applied to the model, in my case, is the only one
that is used internally in the primary OpenFlight file. For example, my
terrain surface is internal and textured as grass. My externally
reference tree models are shaped like trees, but also textured in grass.
I've tried moving the tree's texture files around to be sure that it
wasn't a path issue. It didn't work.
 
Is there anyone that can help me to resolve the issues I am
having? All I want to do is write an OpenFlight file that contains
several clones of another OpenFlight file. The straightforward approach
breaks -- not for the current OSG loader, but for other loaders that
expect node names to be unique.
 
Your friend,
John Argentieri
 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Friday, November 07, 2008 1:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter writes an external reference record when it
encounters a ProxyNode. The importer should do the inverse operation.
 
I searched for the error text you mentioned, but could not find
any code in OSG that displays that error, so I can't really help you
with that.
   -Paul
 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Friday, November 07, 2008 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node
Names?


Paul,
 
Is there a way that I can place multiple instances of an
external .flt file into another .flt file? I'm trying to use ProxyNode,
but still getting these errors:
 
Non primary record found as child. op=19
Non primary record found as child. op=19
Non primary record found as child. op=20
Non primary record found as child. op=20
 
Thanks,
John
 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Friday, November 07, 2008 12:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node
Names?


The 

Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?

2008-11-12 Thread Paul Martz
I must admit I'm stumped, John. From looking at the code in the exporter, I
can't see how it could possibly clear the texture palette override flag when
writing the external reference record. The spec says that when the flag is
set, the child FLT file should use it's own palette. So this should work.
 
I advise you to export to FLT under the debugger and step through
FltExportVisitor::writeExternalReference (expPrimaryRecords.cpp line 411)
and make sure that the flags written to the record really does contain the
bit for the texture palette.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Wednesday, November 12, 2008 9:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


Paul,
 
I'm not sure what the problem is, but I can see that when I create a scene
graph with ProxyNodes in memory, and write that scene graph to an OpenFlight
file using 2.6.1, the external references are somhow broken with respect to
textures. If I convert that  to an .osg and back to .flt using osgconv from
the command line, it seems to work in the 2.6.1 reader, all the way down to
OSG 1.2's primary reader when osgdb_flt.dll was mostly phased out.
 
However, none of the OpenFlight files generated by 2.6.1 can be opened using
the FLT reader in OSG 1.0 / osgdb_flt.dll. Do you have any idea why that is?
I get a single group node, so nothing even gets drawn in this case.
 
Thanks,
John
 
  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Tuesday, November 11, 2008 4:32 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


Thanks, John. If you fix this, please post the fix to osg-submissions.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Tuesday, November 11, 2008 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


Paul,
 
Attached is an example of a bug I found in the FLT writer. If the
GL_POLYGON_OFFSET remains inside of extref.osg, then converting it to FLT
using osgconv will cause the texture of the external reference to disappear.
If the GL_POLYGON_OFFSET is removed from extref.osg, then extref.osg is
converted to FLT using osgconv, the texture on the external reference
remains.
 
Thanks,
John Argentieri

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Tuesday, November 11, 2008 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Guys,
 
Has anyone used the ProxyNode in this way, in OpenFlight files? My primary
file and my externally referenced file are both OpenFlight files. The
externally referenced file gets loaded, but the texture is incorrect. The
texture applied to the model, in my case, is the only one that is used
internally in the primary OpenFlight file. For example, my terrain surface
is internal and textured as grass. My externally reference tree models are
shaped like trees, but also textured in grass. I've tried moving the tree's
texture files around to be sure that it wasn't a path issue. It didn't work.
 
Is there anyone that can help me to resolve the issues I am having? All I
want to do is write an OpenFlight file that contains several clones of
another OpenFlight file. The straightforward approach breaks -- not for the
current OSG loader, but for other loaders that expect node names to be
unique.
 
Your friend,
John Argentieri
 
  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Friday, November 07, 2008 1:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter writes an external reference record when it encounters a
ProxyNode. The importer should do the inverse operation.
 
I searched for the error text you mentioned, but could not find any code in
OSG that displays that error, so I can't really help you with that.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Friday, November 07, 2008 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Paul,
 
Is there a way that I can place multiple instances of an external .flt file
into another .flt file? I'm trying to use ProxyNode, but still getting these
errors:
 
Non primary record found as child. op=19
Non primary record found as child. op=19
Non primary record found as child. op=20
Non primary record found as child. op=20
 
Thanks,
John
 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Friday, November 07, 2008 12:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter dumps the Node name to the FLT record name, just as the
importer does the inverse operation. I don't 

[osg-users] post draw callback

2008-11-12 Thread Ed
I am trying to add a post draw callback to my view.  I think I must be 
missing something as far as how to do this is concerned.  I borrowed the 
MyCameraPostDrawCallback class from the osgprerender example and tried 
to add the callback as follows:


   m_pViewer-getCamera()-setPostDrawCallback(new 
MyCameraPostDrawCallback());


Right now all I am trying to accomplish is to get the callback made but 
that doesn't happen so I must have omitted something.   Can someone 
provide some direction?


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


Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?

2008-11-12 Thread Argentieri, John-P63223
Paul,
 
I'm not sure what the problem is, but I can see that when I create a
scene graph with ProxyNodes in memory, and write that scene graph to an
OpenFlight file using 2.6.1, the external references are somhow broken
with respect to textures. If I convert that  to an .osg and back to .flt
using osgconv from the command line, it seems to work in the 2.6.1
reader, all the way down to OSG 1.2's primary reader when osgdb_flt.dll
was mostly phased out.
 
However, none of the OpenFlight files generated by 2.6.1 can be opened
using the FLT reader in OSG 1.0 / osgdb_flt.dll. Do you have any idea
why that is? I get a single group node, so nothing even gets drawn in
this case.
 
Thanks,
John
 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Tuesday, November 11, 2008 4:32 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node Names?


Thanks, John. If you fix this, please post the fix to osg-submissions.
   -Paul
 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Tuesday, November 11, 2008 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] BUG FOUND: FLT Writer Duplicate Node
Names?


Paul,
 
Attached is an example of a bug I found in the FLT writer. If
the GL_POLYGON_OFFSET remains inside of extref.osg, then converting it
to FLT using osgconv will cause the texture of the external reference to
disappear. If the GL_POLYGON_OFFSET is removed from extref.osg, then
extref.osg is converted to FLT using osgconv, the texture on the
external reference remains.
 
Thanks,
John Argentieri



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Tuesday, November 11, 2008 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


Guys,
 
Has anyone used the ProxyNode in this way, in OpenFlight files?
My primary file and my externally referenced file are both OpenFlight
files. The externally referenced file gets loaded, but the texture is
incorrect. The texture applied to the model, in my case, is the only one
that is used internally in the primary OpenFlight file. For example, my
terrain surface is internal and textured as grass. My externally
reference tree models are shaped like trees, but also textured in grass.
I've tried moving the tree's texture files around to be sure that it
wasn't a path issue. It didn't work.
 
Is there anyone that can help me to resolve the issues I am
having? All I want to do is write an OpenFlight file that contains
several clones of another OpenFlight file. The straightforward approach
breaks -- not for the current OSG loader, but for other loaders that
expect node names to be unique.
 
Your friend,
John Argentieri
 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Friday, November 07, 2008 1:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node Names?


The exporter writes an external reference record when it
encounters a ProxyNode. The importer should do the inverse operation.
 
I searched for the error text you mentioned, but could not find
any code in OSG that displays that error, so I can't really help you
with that.
   -Paul
 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Argentieri, John-P63223
Sent: Friday, November 07, 2008 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [osg-users] FLT Writer Duplicate Node
Names?


Paul,
 
Is there a way that I can place multiple instances of an
external .flt file into another .flt file? I'm trying to use ProxyNode,
but still getting these errors:
 
Non primary record found as child. op=19
Non primary record found as child. op=19
Non primary record found as child. op=20
Non primary record found as child. op=20
 
Thanks,
John
 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Martz
Sent: Friday, November 07, 2008 12:51 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] FLT Writer Duplicate Node
Names?


The exporter dumps the Node name to the FLT record name,
just as the 

[osg-users] shaders in OSG...

2008-11-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Hello,

 

Is there a light weight way to turn off shaders in OSG without unloading
the vertex and fragment shaders from the shader program? 

 

My application needs to switch back and forth from the shader pipeline to
the fixed pipeline and vice versa during runtime. This can be done at the
OpenGL level by calling the function glUseProgramObject() to make the quick
switch. Is there an equivalent in OpenSceneGraph?

 

Thanks in advance,

-Shayne



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Picking on billboards

2008-11-12 Thread Robert Osfield
On Wed, Nov 12, 2008 at 3:16 PM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 So, I've tested on OSG 2.7.5... and it not seems working... picking
 billboard do nothing else piking the node behind the billboard(s)
 ...

 Any proposition/idea ?

Sorry no ideas,  do you have a small example model that reproduces the problem?

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


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread Pasquale Tricarico
Hi Robert,

OK, mystery solved, I was using r9140. I've now updated to r9149.
Sorry about that.

Now the results, using the original options verbatim, are:

Machine: notebook Lenovo T61p, Ubuntu 8.04, Core2Duo 2.2GHz, 2GB ram +
2GB swap, nVidia Quadro FX 570M 256MB, driver 177.80.

1) only99 in 17.7 seconds
2) only   198 in  4.9 seconds
3) only 1,477 in  2.1 seconds
4) all 10,000 in  4.9 seconds
5) all 10,000 in  1.5 seconds
6) all 10,000 in  7.9 seconds
7) only   215 in  1.8 seconds
8) only   237 in  7.8 seconds
9) only   239 in 58   seconds

Test 7 killed the X11 server once.

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


Re: [osg-users] Picking on billboards

2008-11-12 Thread Vincent Bourdier
Hi Robert,

Okay I will try the 2.7.5 directly theses days.
I'll give you feedback.

Thanks
   Vincent.

2008/11/12 Robert Osfield [EMAIL PROTECTED]

 Hi Vincent,

 Could you try the svn/trunk or 2.7.4 release as this has a fix in
 IntersectionVisitor.cpp for billboards.

 Robert.

 On Wed, Nov 12, 2008 at 10:29 AM, Vincent Bourdier
 [EMAIL PROTECTED] wrote:
  Hi All,
 
  I've seen an old post on picking billboards :
  http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/32123
 
  But with OSG 2.6.1, I still cannot pick a billbord. The first intersected
  node returned is the node behind the billboard...
  Does it have been implemented as predicted ?
 
  thanks.
 
  Regards
 Vincent.
 
  ___
  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] Introducing osgmemorytest

2008-11-12 Thread Robert Osfield
Hi Christophe,

Thanks for the stack trace.  This is exception is perfectly fine - it
just shows that too much memory has been allocated by the imagery
itself.

Reducing the number of OpenGL objects via the -g option to 7000 or
less should at least avoid this OSG/C++ memory error.  The other thing
to try is reduce the dimensions of the texture so it uses less memory.

One thing that is a bit odd is why you are running out of memory on a
3GB machine while others are succeeding.  My little shuttle with 1GB
of main memory and 128Mb graphics card is able to allocate all 10,000
Image/Texture and gets to apply 1450 of them before issuing an OpenGL
error.  The compute is using up plenty of swap space at to do this,
but is at least able to allocate all the imagery in main memory.

Could you try a 128x128 texture dimension?   This will reduce memory
consumption to 1/4rd of the 256x256 test.

osgmemorytest --window --texture 128 128 -g 1

Robert.

On Wed, Nov 12, 2008 at 6:02 PM, christophe loustaunau
[EMAIL PROTECTED] wrote:
 Hi Robert,


 The exception on the texture allocation is concerning, could you run
 it in a debugger and found out what the stack trace is.

 Here is the stack trace :

  msvcr80d.dll!_unlock(int locknum=8)  Line 376
  msvcr80d.dll!_unlockexit()  Line 760 + 0x7 bytes
  msvcr80d.dll!_CxxThrowException(void * pExceptionObject=0x00dbf170,
 const _s__ThrowInfo * pThrowInfo=0x68fb3300)  Line 161
  msvcr80d.dll!operator new(unsigned int size=262144)  Line 64
  osg50-osgd.dll!operator new[](unsigned int count=262144)  Line 7 + 0x9
 bytes
  osg50-osgd.dll!osg::Image::allocateImage(int s=256, int t=256, int r=1,
 unsigned int format=6408, unsigned int type=5121, int packing=1)  Line 545 +
 0x9 bytes
  osgmemorytestd.exe!TextureTest::allocate()  Line 150 + 0x2e bytes
  osgmemorytestd.exe!main(int argc=2, char * * argv=0x0247c828)  Line 441
 + 0x2d bytes
  osgmemorytestd.exe!__tmainCRTStartup()  Line 597 + 0x19 bytes
  osgmemorytestd.exe!mainCRTStartup()  Line 414

 It fails when it try to allocate the data for the new image. It always
 happend around the 7781, 7782 or 7783 image.
 When it fails in debug 2.74 of my 3.0 Go ram is used .
 When it fails in release 0.9 of my 3.0 Go ram is used .

 I don't really know what to think about it.


 Regards.
 --
 Christophe Loustaunau.

 ___
 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] DatabasePager question ...

2008-11-12 Thread Robert Osfield
Hi Adrian,

On Wed, Nov 12, 2008 at 6:39 PM, Adrian Egli OpenSceneGraph (3D)
[EMAIL PROTECTED] wrote:
 Ok i see, so you would append a custum reading thread to the osg database to
 avoid subclassing.

There shouldn't be any need for a custom reading thread, just use the
existing threads to call you code via the osgDB::readNodeFile
mechanism - just put your code in a plugin and let the OSG call it.

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Robert Osfield
Hi J-S,

On Wed, Nov 12, 2008 at 5:43 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 One thing, I think you need to move the test for Poppler from the
 examples/osgpdf/CMakeLists.txt to the base CMakeLists.txt, otherwise
 POPPLER_FOUND can never be true when adding the osgpdf example in
 examples/CMakeLists.txt (or at least, it wasn't for me until I moved it).

Sorry about this missing check-in, fix to Poppler check now checked in.

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


Re: [osg-users] Introducing osgpdf

2008-11-12 Thread Melchior FRANZ
* Robert Osfield -- Wednesday 12 November 2008:
 fix to Poppler check now checked in.

Now cmake tries to compile osgpdf, and fails:

  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_new_from_data'
  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_get_n_channels'
  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_get_rowstride'
  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_get_height'
  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_get_width'
  /usr/local/lib/libpoppler-glib.so: undefined reference to 
`gdk_pixbuf_get_pixels'

Looks like the missing symbols are defined in libgdk-x11-2.0.so
and libgdk_pixbuf-2.0.so.

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


[osg-users] Disabling culling for the entire scene?

2008-11-12 Thread Benoit Gagnon
Hi all,

what would be the most effective way to disable culling for my entire scene?

I am using a fixed orthographic camera looking at the XY plane. I use the Z
axis solely for layering my various nodes which are all 2D as well. All my
nodes are always visible by the camera so culling is (almost) useless. The
stats handler reports the culling operation to be (by a long run) the most
time consuming operation.

So, I wish to disable culling for my entire scene. Is that possible? I tried
the following but it doesn't seem to do anything:

osgViewer::Viewer viewer;
viewer.setSceneData( root );
viewer.setUpViewInWindow( 100, 100, 1024, 768, 0 );

osgViewer::ViewerBase::Cameras cameras;
osg::Camera* camera = viewer.getCamera();
camera-setProjectionMatrixAsOrtho( -512, 512, -384, 384, 0, 20 );
camera-setViewMatrixAsLookAt(
osg::Vec3d( 0, 0, 100 ),
osg::Vec3d( 0, 0, 0 ),
osg::Vec3d( 0, 1, 0 )
);
camera-setClearColor(  osg::Vec4d( 0.64, 0.72, 0.78, 1 ) );
camera-setCullingMode( osg::CullSettings::NO_CULLING );

I assume the solution is very trivial but any help is apreciated!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Introducing osgmemorytest

2008-11-12 Thread christophe loustaunau
Hi Robert,


Could you try a 128x128 texture dimension?   This will reduce memory
 consumption to 1/4rd of the 256x256 test.

osgmemorytest --window --texture 128 128 -g 1


Works fine :  alll 10,000 texture allocated and download to OpenGL
in 6.2 seconds

Some other test :

osgmemorytest --window --texture 256 256 -g 7000
315 objects applied before failed.

osgmemorytest --window --texture 256 256 -g 3000
alll 10,000 texture allocated and download to OpenGL
in 5.3 seconds

I have set the swap space to 10Go, and nothing change.

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


[osg-users] How to achieve blend function?

2008-11-12 Thread YangXiao
Hi everyone:
 How to achieve blend funtion in osg. I means  by alpha(0.0~1.0)  value to set 
my geometry color, 
I use follows code
 
 geometry-getOrCreateStateSet()-setMode(GL_BLEND, osg::StateAttribute::ON);
 osg::BlendFunc *fn = new osg::BlendFunc();
  fn-setFunction(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
   
geometry-getOrCreateStateSet()-setAttributeAndModes(fn, 
osg::StateAttribute::ON);

Best regards
YangXiao


  ___ 
 雅虎邮箱,您的终生邮箱! 
http://cn.mail.yahoo.com/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org