[osg-users] Error with drawable

2008-06-26 Thread Ahmed Nawar

Dear All,

I think this is a bug:
If you have a pointer to Drawable. if you add it to geode and 
removed it from this geode.
You can not use this geode again.
I think that OSG remove the Drawable vertex from the memory.

I solve this by adding this drawable to another geode and i don't use this new 
geode.
so the Drawable will be under one geode at least in all cases.

Thanks
Ahmed Nawar


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ahmed Nawar [EMAIL 
PROTECTED]
Sent: Thursday, June 26, 2008 8:38 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Sorry for late.

  It is an update callback.

Thanks,
Ahmed Nawar

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Serge Lages [EMAIL 
PROTECTED]
Sent: Wednesday, June 25, 2008 6:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Hi,

Is it an update callback or a cull calback ?

On Wed, Jun 25, 2008 at 5:11 PM, Ahmed Nawar [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Dear All,

i attached  a callback to a geode node.

CallBack operator:

void GeodeCallBack::operator()( osg::Node* node, osg::NodeVisitor* nv )
{

   osg::Geode* geode =
   dynamic_castosg::Geode*( node );

   geode-removeDrawables(0,geode-getNumDrawables ());

  // get different drawable.
   osg::Drawable *d =  drawableBuilder-getDrawable(dataPoint-shape);

   geode-addDrawable( d );

   traverse( node, nv );
}


1- is it Ok to change the geode's contains in the callback?
2- some times the  geode-addDrawable( d );   terminate the program. any 
ideas?

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



--
Serge Lages
http://www.tharsis-software.com
___
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-submissions] API configuratio ns in aseparateConfig include file

2008-06-26 Thread Mathias Fröhlich

Hi,

On Wednesday 25 June 2008 17:59, Jean-Sébastien Guay wrote:
 I think you're mixing things up. There are three different issues here:

 1. The choice to use Config headers.
 2. The fact that the Atomic header includes windows.h.
 3. The fact that your version of CMake chooses the wrong configuration
 and does not generate the Config header.
Yep.

 Number 1 is a design choice. The choice is basically between having a
 file that defines options that affect the build, and needing to specify
 those options as defines in *each* project that uses OSG. I can see why
 the choice to have a Config file was taken. Otherwise, you would have to
 support people configuring their OSG build one way and then linking to
 it in a project where the incorrect define was being used, which would
 happen more often than you'd think. Having a Config header ensures that
 both the built version of OSG and your project use the same options (as
 long as the same Config header is included for both).
Yep, thanks!

 Number 2 was a mistake (by the person who made the change, but still
 unrelated to the choice in number 1), and is being rectified as we
 speak. Check the messages from yesterday. *That* is what's breaking the
 build on Windows right now.
Yep, I took that from two other open source projects I have provided that code 
for. None of them where that sensitive with including Windows.h. These 
projects could benefit from inlining the functions directly. osg cannot ...
Patch is prepared ...

 As for Number 3, I believe that is caused by CMake 2.4.x. This can be
 investigated and fixed *after* the windows.h issue is fixed, which is
 much more major (as it affects *everyone* building on Windows,
 independently of the version of CMake they use). A workaround for you
 would be to get CMake 2.6 from cmake.org. Then you would get the right
 configuration (interlocked), the Config header would be generated and
 used, and you would see the windows.h include problem... At least that's
 what I think. :-)
That is a bug in the implementation of the configure check.
Alternatively an invocation problem with cmake. I need to call cmake with the 
right output target to make it set up configuration test correct for the 
msvc8 win64 build for example.

  
   you don't need anything different than
  before, since the Config headers are installed with your other OSG
  headers.
  
  Do you have an out-of-source configuration or in source?
  I use the out-of-source configuration and so the config headers are
  installed in the build directory.

 I use an out-of-source build with CMake 2.6, and the Config header is
 being generated just fine. But what I was talking about in the line you
 quoted above is that OSG headers are including the Config headers. If
 you don't do an INSTALL (or make install), then the Config headers are
 not together with your other OSG headers.

 Config headers:
 OpenSceneGraph/build/include/OpenThreads/Config
 OpenSceneGraph/build/include/osg/Config

 Other headers:
 OpenSceneGraph/include/OpenThreads/*
 OpenSceneGraph/include/osg/*

And installed headers and libs:
prefix/include/*
prefix/lib/*
... note: just one single directory to care for.
On *NIX often in a prefix so that you do not need to do anything on the 
compiler command line to make the compiler find that library.

 So the other headers won't find #include OpenThreads/Config or
 #include osg/Config unless you add the directories above (in build)
 to your include file search path. Which was not required before.

 But if you do an INSTALL, you don't have that problem, because the
 INSTALL target copies the Config headers to the same place as the other
 headers, and so #include OpenThreads/Config will work without any
 change to your project files.

Yep, an install will provide all files together in one directory tree. The 
build stage is just an intermediate step that I was surprised somebody will 
use as is. Plenty libraries I know of are only usable when installed. Before 
you will not have any chance to find the shared or static libraries or 
includes somewhere deep in the build/source tree.

When you execute that intall step, you will not notice any difference between 
before that change and past that change. Just that difference that you do no 
longer need to care for keeping defines in sync across probably many 
libs/apps using osg. And that is a benefit IMO ...

 I hope that clears things up.
Thanks, for writing!

GReetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 



Re: [osg-users] Error with drawable

2008-06-26 Thread Paul Melis

Hi,

Ahmed Nawar wrote:

I think this is a bug:
If you have a pointer to Drawable. 
A pointer (osg::Drawable*) or a ref_ptr (osg::ref_ptrosg::Drawable)? 
As Drawable is reference-counted, you should preferably use the latter 
to store pointers to drawables.

if you add it to geode and removed it from this geode.
You can not use this geode again.
I think that OSG remove the Drawable vertex from the memory.
  
If the geode holds the only reference to the drawable and you then 
remove that drawable from the geode, then yes, the drawable is destructed.
But as long as you still have a reference to the drawable somewhere, 
using a osg::ref_ptr, it should not be destructed and you can add/remove 
it to the geode as much as you want.


Do you do something like this?

osg::Drawable *d = ...  // initial reference count = 0
osg::Geode *g =  // initial reference count = 0

g.addDrawable(d); // drawable reference count now 1
g.removeDrawable(d);   // drawable reference count will be decreased, 
reaches zero and the object is therefore destructed



I solve this by adding this drawable to another geode and i don't use this new 
geode.
so the Drawable will be under one geode at least in all cases.
  
You would be better off to store a reference to the drawable somewhere 
in your application without having to use an extra geode. This geode 
will need to be referenced somewhere as well, so it doesn't solve the 
problem.


And as you care that the drawable can be _re-used_ after it is removed 
from the geode it sounds like you want to add the drawable back again at 
some later point in time. For that you need to keep a reference to the 
drawable anyway...


Paul


Thanks
Ahmed Nawar


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ahmed Nawar [EMAIL 
PROTECTED]
Sent: Thursday, June 26, 2008 8:38 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Sorry for late.

  It is an update callback.

Thanks,
Ahmed Nawar

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Serge Lages [EMAIL 
PROTECTED]
Sent: Wednesday, June 25, 2008 6:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Hi,

Is it an update callback or a cull calback ?

On Wed, Jun 25, 2008 at 5:11 PM, Ahmed Nawar [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Dear All,

i attached  a callback to a geode node.

CallBack operator:

void GeodeCallBack::operator()( osg::Node* node, osg::NodeVisitor* nv )
{

   osg::Geode* geode =
   dynamic_castosg::Geode*( node );

   geode-removeDrawables(0,geode-getNumDrawables ());

  // get different drawable.
   osg::Drawable *d =  drawableBuilder-getDrawable(dataPoint-shape);

   geode-addDrawable( d );

   traverse( node, nv );
}


1- is it Ok to change the geode's contains in the callback?
2- some times the  geode-addDrawable( d );   terminate the program. any 
ideas?

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



--
Serge Lages
http://www.tharsis-software.com
___
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] Error with drawable

2008-06-26 Thread Ahmed Nawar
Dear Paul,

  Drawable is reference-counted?
  This is new to me. Thanks.

  I used osg::Drawable* and not smart pointer.
  Because i think that this will make the drawable stay and not delete if i 
removed it from geode. Thanks for help.

  I need to put my drawables in a vector. How can i keep the smart pointers in 
a vector?

Thanks,
Ahmed Nawar

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Paul Melis [EMAIL 
PROTECTED]
Sent: Thursday, June 26, 2008 10:50 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Error with drawable

Hi,

Ahmed Nawar wrote:
 I think this is a bug:
 If you have a pointer to Drawable.
A pointer (osg::Drawable*) or a ref_ptr (osg::ref_ptrosg::Drawable)?
As Drawable is reference-counted, you should preferably use the latter
to store pointers to drawables.
 if you add it to geode and removed it from this geode.
 You can not use this geode again.
 I think that OSG remove the Drawable vertex from the memory.

If the geode holds the only reference to the drawable and you then
remove that drawable from the geode, then yes, the drawable is destructed.
But as long as you still have a reference to the drawable somewhere,
using a osg::ref_ptr, it should not be destructed and you can add/remove
it to the geode as much as you want.

Do you do something like this?

osg::Drawable *d = ...  // initial reference count = 0
osg::Geode *g =  // initial reference count = 0

g.addDrawable(d); // drawable reference count now 1
g.removeDrawable(d);   // drawable reference count will be decreased,
reaches zero and the object is therefore destructed

 I solve this by adding this drawable to another geode and i don't use this 
 new geode.
 so the Drawable will be under one geode at least in all cases.

You would be better off to store a reference to the drawable somewhere
in your application without having to use an extra geode. This geode
will need to be referenced somewhere as well, so it doesn't solve the
problem.

And as you care that the drawable can be _re-used_ after it is removed
from the geode it sounds like you want to add the drawable back again at
some later point in time. For that you need to keep a reference to the
drawable anyway...

Paul

 Thanks
 Ahmed Nawar

 
 From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ahmed Nawar [EMAIL 
 PROTECTED]
 Sent: Thursday, June 26, 2008 8:38 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] callback

 Sorry for late.

   It is an update callback.

 Thanks,
 Ahmed Nawar
 
 From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Serge Lages [EMAIL 
 PROTECTED]
 Sent: Wednesday, June 25, 2008 6:14 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] callback

 Hi,

 Is it an update callback or a cull calback ?

 On Wed, Jun 25, 2008 at 5:11 PM, Ahmed Nawar [EMAIL PROTECTED]mailto:[EMAIL 
 PROTECTED] wrote:

 Dear All,

 i attached  a callback to a geode node.

 CallBack operator:

 void GeodeCallBack::operator()( osg::Node* node, osg::NodeVisitor* nv )
 {

osg::Geode* geode =
dynamic_castosg::Geode*( node );

geode-removeDrawables(0,geode-getNumDrawables ());

   // get different drawable.
osg::Drawable *d =  drawableBuilder-getDrawable(dataPoint-shape);

geode-addDrawable( d );

traverse( node, nv );
 }


 1- is it Ok to change the geode's contains in the callback?
 2- some times the  geode-addDrawable( d );   terminate the program. any 
 ideas?

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



 --
 Serge Lages
 http://www.tharsis-software.com
 ___
 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] Error with drawable

2008-06-26 Thread Paul Melis

Ahmed Nawar wrote:

Dear Paul,

  Drawable is reference-counted?
  This is new to me. Thanks.
  
Everything that derives from osg::Object (which derives from 
osg::Referenced) is reference-counted, including osg::Drawable.

  I used osg::Drawable* and not smart pointer.
  Because i think that this will make the drawable stay and not delete if i 
removed it from geode. Thanks for help.

  I need to put my drawables in a vector. How can i keep the smart pointers in 
a vector?
  

std::vectorosg::ref_ptrosg::Drawable 

Paul

Thanks,
Ahmed Nawar

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Paul Melis [EMAIL 
PROTECTED]
Sent: Thursday, June 26, 2008 10:50 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Error with drawable

Hi,

Ahmed Nawar wrote:
  

I think this is a bug:
If you have a pointer to Drawable.


A pointer (osg::Drawable*) or a ref_ptr (osg::ref_ptrosg::Drawable)?
As Drawable is reference-counted, you should preferably use the latter
to store pointers to drawables.
  

if you add it to geode and removed it from this geode.
You can not use this geode again.
I think that OSG remove the Drawable vertex from the memory.



If the geode holds the only reference to the drawable and you then
remove that drawable from the geode, then yes, the drawable is destructed.
But as long as you still have a reference to the drawable somewhere,
using a osg::ref_ptr, it should not be destructed and you can add/remove
it to the geode as much as you want.

Do you do something like this?

osg::Drawable *d = ...  // initial reference count = 0
osg::Geode *g =  // initial reference count = 0

g.addDrawable(d); // drawable reference count now 1
g.removeDrawable(d);   // drawable reference count will be decreased,
reaches zero and the object is therefore destructed

  

I solve this by adding this drawable to another geode and i don't use this new 
geode.
so the Drawable will be under one geode at least in all cases.



You would be better off to store a reference to the drawable somewhere
in your application without having to use an extra geode. This geode
will need to be referenced somewhere as well, so it doesn't solve the
problem.

And as you care that the drawable can be _re-used_ after it is removed
from the geode it sounds like you want to add the drawable back again at
some later point in time. For that you need to keep a reference to the
drawable anyway...

Paul

  

Thanks
Ahmed Nawar


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ahmed Nawar [EMAIL 
PROTECTED]
Sent: Thursday, June 26, 2008 8:38 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Sorry for late.

  It is an update callback.

Thanks,
Ahmed Nawar

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Serge Lages [EMAIL 
PROTECTED]
Sent: Wednesday, June 25, 2008 6:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] callback

Hi,

Is it an update callback or a cull calback ?

On Wed, Jun 25, 2008 at 5:11 PM, Ahmed Nawar [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Dear All,

i attached  a callback to a geode node.

CallBack operator:

void GeodeCallBack::operator()( osg::Node* node, osg::NodeVisitor* nv )
{

   osg::Geode* geode =
   dynamic_castosg::Geode*( node );

   geode-removeDrawables(0,geode-getNumDrawables ());

  // get different drawable.
   osg::Drawable *d =  drawableBuilder-getDrawable(dataPoint-shape);

   geode-addDrawable( d );

   traverse( node, nv );
}


1- is it Ok to change the geode's contains in the callback?
2- some times the  geode-addDrawable( d );   terminate the program. any 
ideas?

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



--
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list



  

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





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

  


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

Re: [osg-users] [Not OSG related question] Virtual memory management on Windows

2008-06-26 Thread Serge Lages
Thanks a lot for your explanation Gordon, I ended to the same conclusion,
I'll need to go to a 64bits platform. I'll install an XP 64, and not a Linux
David... :)

Thanks again !

On Thu, Jun 26, 2008 at 12:30 AM, Gordon Tomlinson 
[EMAIL PROTECTED] wrote:

  Hi



 There's many issues why you will struggle with this and no it's not just a
 windows issues it effects other OS's some do a better job off moving the
 issues forward but they will still crop up



 Simplest solution is to go to a 64bit OS with a good 8gb or more.



 There is another limitation you will hit on 32bit windows is you can only
 have an address space per process of 1.8gb , other OS's such as Unix's and
 Linux's do a much better job and get you near the true 32bit limit



 Another problem is that you need a contiguous memory area for malloc/new on
 windows  this is a  big problem ,



 Some of the reasons why this is an issue is that Windows has already eaten
 up a chunk of the available memory, not only with programs , services ,
 dll's being loaded they sadly  simply  don't get then next serial  memory
 address, they may be load smack bang in the middle of the address space, so
 straight away that can l half the size of the max malloc/new you can do. As
 you load more programs more dll's the longer windows is running the more
 fragmented the memory will get and the smaller the max malloc/new can create
 will get lower, the MAC's OS's are the best at handling this sort of thing
 and Linux is typically better than window's



 What you can try is all the normal traditional tips, only run [processes,
 services that absolutely need to  etc see
 http://www.vis-sim.com/vega/vegafaq1.htm#f39 ( needs modernizing but the
 gist is valid)



 This use be a big problem back in the heyday of IRIX, it would load is
  system SO's(dll's)  smack bang in the middle of memory the same for
 programs. What had to be do there was to force the system to load its libs
 either high or low and you has to rebase the loading address of all the SO's
 your program used.



 You can do a similar thing in Windows and for all your dll's to re-base and
 control were they load. If you do that the final  trick is that as some as
 your application starts you need to create the large memory stuff straight
 away, otherwise your address space will get fragmented and your back to
 square one



 At my company we have to handle multi-terra byte imagery and have to use
 processes like I have described, so it can be done. you just need an
 engineer that knows this hard stuff, thankfully  we have an engineer that
 does ;) and no you cannot have him ;)







 __
 *Gordon Tomlinson *

 Email   : [EMAIL PROTECTED]
 YIM/AIM : *gordon3dBrit*
 MSN IM  : [EMAIL PROTECTED]
 Website : *www.vis-sim.com www.gordontomlinson.com*

 __



 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *David Callu
 *Sent:* Wednesday, June 25, 2008 3:05 PM
 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] [Not OSG related question] Virtual memory
 management on Windows



 power linux Serge ;-).

 Regards
 David Callu

 2008/6/25 Serge Lages [EMAIL PROTECTED]:

 Hi all,

 I have a question not related to OSG but I can't find any answer, and this
 is something that some of you probably knows. That's why I try here to find
 some help.

 Here is my problem : I have a big image database with some images larger
 than 1.5Go uncompressed, and I fail to load them (Win XP SP2 32bits with
 Visual Studio 8). My computer has 3Go of virtual memory and the option /3GB
 is activated on the system. In this document (page 13) :

 http://actes.sstic.org/SSTIC05/Vulnerabilites_et_gestion_des_limites_memoire/SSTIC05-article-Delalleau-Vulnerabilites_et_gestion_des_limites_memoire.pdf
 It says it's not possible to allocate more than 1.3Go in one call, and it's
 actually the limit where it crashs. If I do 2 allocations of 1Go each, it
 works, but 1 allocation of 1.4Go crashs...

 Has someone any idea if it's possible to change this limit ? My only hope
 will be to make smaller images, or even to develop under Linux ? :)
 Thanks in advance !

 --
 Serge Lages
 http://www.tharsis-software.com
 ___
 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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Particles being culled

2008-06-26 Thread CG
Hi Charles,
 
I've tried the setParticleAlignment and it didn't work.Regards,
Cg



 Date: Wed, 25 Jun 2008 23:28:53 -0600 From: [EMAIL PROTECTED] To: 
 osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particles being 
 culled  try: 
 ps-setParticleAlignment(osgParticle::ParticleSystem::BILLBOARD);   On 
 Wed, Jun 25, 2008 at 11:23 PM, CG [EMAIL PROTECTED] wrote:  Hi Charles, 
   Thanks for the reply, what are the settings for the eye point facing? 
   Regards,  Cg     Date: Wed, 25 
 Jun 2008 23:18:07 -0600  From: [EMAIL PROTECTED]  To: 
 osg-users@lists.openscenegraph.org  Subject: Re: [osg-users] Particles 
 being culled   I think the default for particle systems is that 
 particles are little  billboards which always face the viewer's eye point. 
 It looks like  you've undone that setting somehow, and that the billboards 
 are facing  different directions.   On Wed, Jun 25, 2008 at 11:07 
 PM, CG [EMAIL PROTECTED] wrote:   Hi all, I'm trying to 
 simulate a smoke trail
  emitting from a moving tank by   using   Joseph's codes but some 
particles are being culled (see attached   picture).   Any ideas what 
are the causes? Thanks, Cg 
   Make the most of what you can do on your 
PC and the Web, just the way   you   want. Windows Live   
___   osg-users mailing list 
  osg-users@lists.openscenegraph.org 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org  
   --  AsymptopiaSoftware | [EMAIL PROTECTED]  
www.asymptopia.org  ___  
osg-users mailing list  osg-users@lists.openscenegraph.org  
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org  
    Share your beautiful moments with 
Photo Gallery. Windows Live Photo Gallery  ___
   osg-users mailing list  
osg-users@lists.openscenegraph.org  
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org  
--  AsymptopiaSoftware | [EMAIL PROTECTED] www.asymptopia.org 
___ osg-users mailing list 
osg-users@lists.openscenegraph.org 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_
Check out Barclays Premier League exclusive video clips here!
http://fc.sg.msn.com/index.aspx___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CMake build on OSX

2008-06-26 Thread Robert Osfield
Hi Guys,

We'll need to add a version check into the CMake build so that under
OSX you need 2.6 or later.  Once I've done my trawl through the
email/support backlog I'll look at this.  Others are welcome to dive
in and implement it before I get to it ;-)

Robert.

On Tue, Jun 24, 2008 at 2:31 PM, Stephan Maximilian Huber
[EMAIL PROTECTED] wrote:
 Hi Gerrick,

 Gerrick Bivins schrieb:

 I updated my osg build area to the latest and greatest and found that
 turning on applications and examples flags
 causes CMake to error out on Mac OSX 10.5.3. Turning these off allows for
 a
 successful compile/install. Is anyone else
 seeing this?

 What version of cmake are you using? Try updating cmake to 2.6, I had
 similar problems with cmake 2.4


 cheers,
 Stephan
 ___
 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-submissions] API configurations in aseparateConfig include file

2008-06-26 Thread J.P. Delport

Hi,

I was (thankfully) sleeping over some possibly nasty response last night 
to the earlier discussions, but was pleasantly surprised with all the 
messages this morning.


Bob, thanks for your honesty.

The force strong with this community is ;)

jp

Bob Kuehne wrote:

osg-users,

what fun would this list be if someone (lucky me) didn't get to stick their
foot in their mouth from time to time. :)

don't get me wrong:

i think osg is by _far_ the best designed and implemented scenegraph out
there. and robert does the best job at balancing an admittedly difficult
task - incorporating changes from users, his own ideas and designs, and
criticism from all fronts (mine included). i use osg for 100% of the
projects i do work on and would have it no other way.

having been involved with osg since it's inception, i'm both very satisfied
and very critical of it, out of concern that it continues to evolve in
a way that takes care of it's users yet adapts to the ever-changing
graphics landscape. and i do try to contribute to make it better in little
ways here and there.

and so, as an act of contrition (yes, i was raised a catholic child),
i submit my updated 'FindOSG.cmake' which i use to create builds of apps
with osg on windows, linux, and the mac. this cmake FIND_PACKAGE tool will
setup the variable OSG_INCLUDE_DIRS to point to both the generated and
installed source of osg, as well as the OSG_LIBRARY_DIR for the discovered
osg libraries.

i'll post an entire standalone example to submissions later, because i
think having a way for users to build a standalone app would be a useful
addition, especially with the changing build landscape.

sheepishly, (not a scotland joke)
bob





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


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


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


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


Re: [osg-users] Warning on 64bits: cast to pointer from integer ofdifferent size

2008-06-26 Thread John Vidar Larring

Hi Peter,

... is OpenSceneGraph working with 64bit?

We are using OSG on 64 bits linux platform without any problems, so 
obviously OSG works with 64bit systems. However, I have no experience 
with OSG + Vista combination what so ever, and I am not planning to gain 
any either... hehe;)


Best regards,
John

Peter Wraae Marino wrote:

Hi James,
 
I always thought that int and unsigned int would be the best fit 
n-bit on the system? if it was an 8bit system
then it would be 8bit int, if 32bit system then 32bit int or did I 
mis-understand something?
 
and now that we are on the subject of 64bit.. I would like to ask a 
question... I considering buying a new
computer and OS -- the OS (I know Robert will hate this).. is going to 
be Vista 64 bit and would like to

start coding using 64bit.. is OpenSceneGraph working with 64bit?
 
regards,

Peter


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [osg-users] osgViewer help needed

2008-06-26 Thread Robert Osfield
Hi John,

What operation are you needing to do?

Robert.

On Tue, Jun 24, 2008 at 12:30 AM, Argentieri, John-P63223
[EMAIL PROTECTED] wrote:
 All,

 I need to have a callback from within osgViewer::CompositeViewer that
 happens just before each graphics context's renderer does cull_draw(). It
 can't be part of the cull traversal or the camera's pre-draw traversal, or
 the update traversal. Single threaded, and right before the cull traversal.
 Does anyone know of a way that this can be done without gutting osgViewer?

 Many thanks,
 John Argentieri

 ___
 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] Get A line on the terrain surrface at current lod level

2008-06-26 Thread Robert Osfield
On Tue, Jun 24, 2008 at 2:34 AM, ZHMW [EMAIL PROTECTED] wrote:
 Hi Robert,
 I'm pleased to dive in a code, I want to release the method
 get/setEyePoint(osg::Vec3 ) and getDistanceToEyePoint() to select the
 right level of lod, also change the code of apply(lod ) and apply(PagedLOD
 ), and then add some method to set the traverse mode( the heightest level
 of lod mode and the right level mode ) for user.
 Is that would be work?

I guess so, try it and see.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Windows build is broken (was: RE: Please test SVNofOpenSceneGraph in pre for2.5.3dev release)

2008-06-26 Thread Robert Osfield
On Tue, Jun 24, 2008 at 8:55 AM, Mathias Fröhlich
[EMAIL PROTECTED] wrote:
 The build system defines the nominmax define only for msys and cygwin.

 Probably we should either
 * define nominmax on win32 in any case or
 * change the code not to use variables called min or max and include
 algorithm which should provide std::min and std::max and makes msvc 8
 indeed compile the code (does this also work for other msvc's??).

 Which one Robert?

Mathias is this now fixed with the latest changes from you?

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


Re: [osg-users] osgViewer::CompositeViewer Thread Safety

2008-06-26 Thread Robert Osfield
Hi John,

Could you give a bit more context to when in the frame and what thread
you are doing operations from, without this info there is really no
chance to help you.

As a general not CompositeViewer and Viewer are identical when it
comes to threading - they even share the same code for doing the
rendering and threading.

Robert.

On Tue, Jun 24, 2008 at 4:07 PM, Argentieri, John-P63223
[EMAIL PROTECTED] wrote:
 Guys,

 Is it safe to modify the scene graph outside of frame() with CompositeViewer
 with ThreadingModel SINGLE_THREADED, even if I don't call stopThreading()?

 We are changing the node mask of certain elements during the root node's
 cull callback. This turns certain draw elements on or off, but more
 importantly it turns the textures mapped to those elements on or off as
 well.

 The issue that I am seeing is that if I call stopThreading, the textures
 mapped to the draw elements are not the ones that I assigned, but random
 ones that exist on other elements. This might be some kind of display list
 corruption or something.

 One more question: If someone has seen this behavior before, is there a way
 to set up the draw elements so that this issue does not occur when I call
 stopThreading?

 I appreciate any input that you guys can provide that may help me on this
 issue.

 Sincerely,

 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
 intended recipient, please contact the sender by reply email and destroy all
 copies of the original message.

 ___
 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] LODScaleHandler crash on unref

2008-06-26 Thread Robert Osfield
HI Amalric,

Thanks for the example, I'll have a look at item 2 with this example
and see how I get on.

W.r.t you item 1 - the resize issue, I'm not a Window developer so
have 0 MFC expertise, the best I can suggest is that you look at the
resize propagation i.e. are resize events being passed from MFC to the
actual GraphicsContext?  Please be prepared to dive into the code
yourself and try to debug it as the set of OSG users who use MFC will
be relatively small percentage.

Robert.

On Tue, Jun 24, 2008 at 9:30 AM, amalric alexandre
[EMAIL PROTECTED] wrote:
 Hi Jean-Sébastien,

 I was kidding when I was saying that the community wasn't really
 appreciating windows.

 I have resolved my bug about adding and removing views, I don't know exactly
 how because I made a lot of modification in my code and I was a little bit
 lost.

 But there is 2 others strange behaviours that the community can reproduce :

 1) The first one is about the MFC sample (OSG 2.5.2), sorry it's seems to be
 related to the GraphicsWindowWin32 :
  - First open a model
  - Minimize the first window
  - Click on Window-New Window
  - Minimize the second window
  - Close the first window
  - Then try to resize by holding the corner of the second window
 You'll see something like the picture I attached.


 2) The second bug is about something we told in a previous post :
 [osg-users] Textures disappear when removing and adding views
 I attached a code sample (derived from osgwindow sample) wich reproduce this
 kind of bug :
  - Launch my sample, loading the cow.osg (default behaviour no args)
  - Press 'a' key to remove a view from the composite viewer
  - Press 'z' key to add a new view to the composite viewer
  - The new view is showing a cow without any texture

 How can we avoid this kind of behaviour, am I missing something ?

 Kind regards,




 2008/6/23 Jean-Sébastien Guay [EMAIL PROTECTED]:

 Hello Alexandre,

 I know that the community isn't really appreciating windows and MFC but
 I'm not sure to reproduce the bug in an other example, I'll give a try and
 you will hear from me if I succeed.

 I wouldn't interpret what Robert said as the community isn't really
 appreciating Windows and MFC, just that if you base your example on the MFC
 example then you're vastly reducing the chances that your problem will get
 debugged/fixed. The simulation market (where OSG has been mostly used since
 the project was started) has traditionally been more Unix/Linux-centered, so
 it's not surprising that Windows is not chosen as much.

 Please try to reproduce your problem in a general example (like
 osgcompositeviewer for example) and if you succeed, send it in. If not, then
 modify osgviewerMFC to see if you can reproduce it there. I can test it out,
 and so can others I think, just not the majority of the poeple who are well
 placed to find/fix the problem (I may be able to compile/run your example,
 but I might not be able to find out what's wrong...).

 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



 --
 Alexandre AMALRIC Ingénieur RD
 ===
 PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
 http://www.pixxim.fr
 ___
 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] problem with osg composite viewer

2008-06-26 Thread David _

Hi

running vista 32 with osg 2.4 stable release and visual studio 2005

our app can switch between one view to multiple views of the same scene. We use 
compositeviewer for that and we´ve got some pagedlod terrains

when we switch from one view to four, and during the switch the 
databasepageloader is loading things, then we get some white blocks on the 
terrain surface

it seems that it looses all the pending petitions that were on the fly

we´re doing the switch by killing all the views with 
osg_composite_viewer-removeView and then adding so much views as needed with 
osg_composite_viewer-addView. Any time addview is called, a new viewer is 
created and we pass the scene to it (root node of the scene tree)

i guess that we´re loosing the databasepager when killing all the views and the 
and we´re loosing all the pending petitions either, or something like that

any ideas how to avoid this??? do i have to keep at least one view alive???

thanks











_
La vida de los famosos al desnudo en MSN Entretenimiento
http://entretenimiento.es.msn.com/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to set a nodeVisitor inside guiEvenetHandler?

2008-06-26 Thread Robert Osfield
Hi Hui,

You can only get a NodeVisitor if a NodeVisitor is used to fire off
the handle call, and this only happens when you attach a event handler
as  node event callback.  Event handlers attached directly to the
viewer aren't visited by a visitor to the visitor pointer will be
null.

Robert.

On Tue, Jun 24, 2008 at 4:42 PM, hui [EMAIL PROTECTED] wrote:
 Hi,



 In GUIEventHandler class the handle function is like :

 handle(

 const osgGA::GUIEventAdapter ea,osgGA::GUIActionAdapter aa, osg::Object*,
 osg::NodeVisitor* nv);

 But I implement it and find NodeVisitor nv is always empty. How can I set a
 nodeVisitor to this function? I trace the code and find this function is
 called by viewer class with

 Viewer::eventTraversal()

 {

   ...

 (*hitr)-handleWithCheckAgainstIgnoreHandledEventsMask( *

 event, *this, 0, 0);

  

 }

 it looks like the nodeVisitor is always empty.



 Thanks in advance



 Hui

 ___
 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] View::computeIntersections Bug withGUIEventAdapter::Y_INCREASING_DOWNWARDS?

2008-06-26 Thread Robert Osfield
Hi Andrew,

OK, only happening on a fresh viewer is the key missing bit of info.
Current the computeIntersections code rely upon the previous event
state to know what coordinate frame you are working in.  This is
design issue in osgViewer - bascially the compute intersections
methods try to be too clever and do too much work for the user,
instead these methods should really be forcing the user to pass more
information in about the coordinate frame of the events.  Fixing this
will entail changing the API, I do have this refactor in mind, but
first I have bucket load of support/submissions/dev releases to get
out the door.

Robert.

On Tue, Jun 24, 2008 at 6:12 PM, Somerville, Andrew
[EMAIL PROTECTED] wrote:
 I forgot to reply about osgpick and the manipulators...

 I may not have been clear originally: This issue only happens on a fresh 
 viewer, before any mouse input has happened. So it is expected that osgPick  
 will not have a problem, as osgPick always uses computeIntersections via a 
 pointerEvent which itself resolves the issue.  Camera manipulators probably 
 don't use the offending osgViewer::View::getCameraContainingPosition unless 
 through a pointer event which again by nature solves the issue.

 The only way that this would be expected to show up is if someone is using 
 computeIntersections (or anything that uses getCameraContainingPosition) at 
 the very beginning of an application before any mouse input would have 
 reached the viewers eventQueue, which is how I ran into it.

 A simple example might be if someone was programatically determining if a 
 particular object is in a certain quadrant of the screen.

 You can see a similar situation in the osgviewerQT example I posted.


  Andy


 -Original Message-
 From: [EMAIL PROTECTED] on behalf of Robert Osfield
 Sent: Sun 6/22/2008 1:21 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] View::computeIntersections Bug 
 withGUIEventAdapter::Y_INCREASING_DOWNWARDS?

 Hi Andy,

 The support for mouse coordinates is rather complicated by support for
 multiple graphics contexts, and multiple windowing systems.  If there
 is a bug it is unlikely to be a general problem - as examples like
 osgpick and the camera manipulators are all working well  - suggesting
 that mostly the mouse coordinate system are working together just
 fine.

 So to work out when you think there is a bug could you please example
 what viewer combination you are using, and what values you are sending
 to the computeIntersections.

 Robert.

 On Sat, Jun 21, 2008 at 11:32 PM, Somerville, Andrew
 [EMAIL PROTECTED] wrote:

 Hey for a long time I've seen behavior where, if I attempt to use 
 View::computeIntersections before sending any input to the eventQueue, the Y 
 value seems to be inverted. I.e. attempts to pick at the bottom of the 
 screen return results from the top of the screen. This would happen at 
 startup before any mouse input had been forwarded to the viewer. I tried to 
 figure it out when I was still a newbie and gave up since there are several 
 easy workarounds (programmatically simulate a mouse event, etc.) and I 
 figured I was just doing something wrong.


 Recently when cleaning up some code I figured I'd give it another try, and I 
 think I may have found the source of the problem.

 - osgViewer::View::computeIntersections calls 
 osgViewer::View::getCameraContainingPosition
 - which as a side effect provides transformed local_x, and local_y.
 - depending on 
 getEventQueue()-getCurrentEventState()-getMouseYOrientation(), Y can be 
 inverted in the transformation
 - EventQueue's constructor's default arg sets mouseYOrientation to 
 GUIEventAdapter::Y_INCREASING_DOWNWARDS
 - osgViewer::View creates it's eventQueue with no arguments thus has 
 mouseYOrientation Y_INCREASING_DOWNWARDS
 - EventQueue sets its GUIEventAdapter _accumulateEventState 
 (getCurrentEventState) mouseYOrientation from the orientation passed to its 
 constructor
 - thus by default View::computeIntersections will invert y
 - until in Viewer::eventTraversal(), upon a pointerEvent, 
 eventState-setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS)
  is called

 - (setMouseYOrientation does not seem to be called anywhere else in Osg, so 
 the value cant seem to change otherwise)


 So it seems that it is a bug considering that the start state is always 
 Y_INCREASING_DOWNWARDS and upon any pointer input, always gets set to 
 Y_INCREASING_UPWARDS without regard to any other parameters or conditions. 
 However I can't completely confirm all of this as my hack fix to prove the 
 analysis failed. To prove to myself that this is the issue I call 
 viewer-getEventQueue()-getCurrentEventState()-setMouseYOrientation( 
 osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS )  which should negate the 
 problem, and it seems that it doesn't.


 Can anyone:

 - confirm that they have seen this issue before themselves?
 - confirm that my analysis is (in)correct ?
 and/or
 - tell 

[osg-users] Anyone using OSG in Windows with 3 (or more) monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Wojciech Lewandowski
Hi everyone,

Topic says it all. Is anyone using OSG on Windows with 2 or more graphics 
boards and more than 3 monitors ? If yes what graphics ? Is this possible with 
Linux ?

We got the question from upper level whether it would be possible 
(theoretically)  to drive 3 or more displays from one machine. I said yes but 
practice shows different picture. At the moment we don't have acces to 2 
identical boards so I put one NVidia Geforce 8800 GTS and one GeForece 7800 GTX 
into may machine. But osgviewer seems to run only on the graphics board which 
is attached to default main screen (set in graphics control dialog).

Do others have more positive experiences ? If yes, what is your configuration ?

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


Re: [osg-users] Rendering to multiple graphics cards

2008-06-26 Thread Robert Osfield
Hi Bob,

Using the screenNum set to 0 or 1 should select the appropriate card.
 When you run osgviewer on your system it should open up two
windows/two slave cameras automatically, press 'f' to toggle off full
screen to see the actual windows.

Robert.

On Tue, Jun 24, 2008 at 8:56 PM, Bob Balfour [EMAIL PROTECTED] wrote:
 I also have an HP Windows (Vista) box with 2 Nvidia graphics cards
 (independent, not SLI-configured). In order to configure two osg::cameras,
 each one rendering to its own specific Nvidia card, how do you specify a
 camera graphics context for a specific graphics card.  Is it simply
 specifying the appropriate traits-screenNum, or does it take more than
 that?  Has anyone done this in Windows Vista?

 Thanks.

 Bob.
 --

 Robert E. Balfour, Ph.D.
 Exec. V.P.  CTO,  BALFOUR Technologies LLC
 960 So. Broadway, Suite 108, Hicksville NY 11801
 Phone: (516)513-0030  Fax: (516)513-0027  email: [EMAIL PROTECTED]
 Solutions in four dimensions with fourDscape(R)

 ___
 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 User Group in Norway

2008-06-26 Thread John Vidar Larring

Hi All,

From names and email addresses of people posting to this mailing list, 
I have gathered that there are several OSG users here in Norway. My 
location is in the Oslo area, so if there are other OSG users close by, 
then I'd like to suggest an informal get-together at a local pub or 
other suitable venue later this summer/fall.


Anyway, if you are an OSG user located in Norway, please add yourself to:
http://www.openscenegraph.org/projects/osg/wiki/Community/UsersGroups

Med vennlig hilsen,
John Vidar

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [osg-users] question on compositeviewer

2008-06-26 Thread Robert Osfield
Hi Xinyu,

It is possible to add/remove views from a CompositeViewer, but there
are a few caveats to it, and it looks like a few bugs that need to be
worked through to make it seemless.  There are other threads
discussing this right now so I'd recommend checking through the
archives.

Robert.

On Tue, Jun 24, 2008 at 9:46 PM, Xinyu Zhang [EMAIL PROTECTED] wrote:
 What is the way to change the number of views in a CompositeViewer? say 
 change from three views to two views at run time.

 I tried to remove a view and change the viewports of other views. The removed 
 view is still displayed.

 Do I have to create a new CompositeViewer instead?

 Thanks.




 ___
 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::Shader destructor

2008-06-26 Thread Robert Osfield
On Tue, Jun 24, 2008 at 10:59 PM, Mike Weiblen [EMAIL PROTECTED] wrote:
 Is that by intent or oversight?  Seems like a risky mix of usemodels.

It's intent.  In general all refernce counted objects should have a
protected destructor, forcing developers to correctly create the
objects on the heap using new, rather on the stack as this would then
break the memory managment - as objects on the stack always get
deleted when they go out of scope no matter if you reference count
them or not.   The rule for almost all OSG objects is they correctly
have protected destrucutor.

So why the exception to this rule.  Two key exceptions are NodeVisitor
and Viewer/CompositeViewer.  So why???  Pragmatism, sometimes this
classes you'll want to create on the heap and share instances of them,
other times you just want to create a NodeVisitor or Viewer in local
scope - here forcing the use of ref_ptr etc just makes more code for
users to write for no gain.

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


Re: [osg-users] Anyone using OSG in Windows with 3 (or more) monitors on 2 (or more) graphics cards ?

2008-06-26 Thread David Spilling
Wojtek,

You could see if SoftTH (http://www.kegetys.net/SoftTH/) works for you - my
colleagues have had some good OpenGL experience with it (although not
specifically with OSG).

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


Re: [osg-users] Windows build is broken (was: RE: Please test SVNofOpenSceneGraph in pre for2.5.3dev release)

2008-06-26 Thread Mathias Fröhlich

Robert,

On Thursday 26 June 2008 12:18, Robert Osfield wrote:
 Mathias is this now fixed with the latest changes from you?
It compiles again, yes.
Pulling Windows.h did break it.
So forget that.

Anyway, the no-windows-h tarball was not fully integrated. At least I can see 
still a diff to the tree where I extrected the change. The atomic 
implementation file is missing in some cases.

GReetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] positioning a node - XYZ with offset in screen space

2008-06-26 Thread Robert Osfield
Hi Sherman,

On Wed, Jun 25, 2008 at 6:31 AM, sherman wilcox
[EMAIL PROTECTED] wrote:
 You could try using an osg::AutoTransform that is positioned at your
 XYZ and set up to scale to screen coords and rotate to screen, then
 have the subraph by offset up the Y axis (effectively in screen space)
 to give you the offset you want.

 The last bit - have the subraph by offset up the Y axis (effectively
 in screen space) to give you the offset you want. - what exactly do
 you suggest? What I require is an approximate offset in pixels. For
 example, if I want a node (lets use text as an example) to be at
 position XYZ in world coordinates and then offset by 45 pixels along
 the Y axis - what do you suggest? I have one method working that I'm
 not pleased with performance wise. The crucial bit is getting close to
 the number of pixels specified to be offset by.

The AutoTransform when scaling to screen coords tries to map a single
unit on the subgraph to a single pixel, so if you want the label to
appear 45 pixels up, then set its position to 45 units up.  You might
be able to use the pivot point to give you this local offset, i.e.
keep you subgraph in local coords you want, but then use pivot point
in this local coords that is below it, then the autotransform will
rotate around an origin that isn't the center of you subgraph, but an
offset point.

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


Re: [osg-users] MRT

2008-06-26 Thread Robert Osfield
Hi Guy,

I haven't done much work on MRT, but I'll have stab at answering as no
one else has yet...

On Wed, Jun 25, 2008 at 11:13 AM, Guy [EMAIL PROTECTED] wrote:
  I've a question regarding MRT, both in OSG and in general OpenGL.

 When I render to MRT, does the manipulations that occur after the
 rasterization, like alpha blending, ZBuffer test atc, apply to all the
 Rendering Targets? Is it possible to set different parameters for those
 stages, to each Rendering Target?

MRT is just for colours so it doesn't affect depth, so I'd guess that
one depth test will apply to all colour ouputs.  I'd expect the
blending to work as usual, but done individually for each colour
output with its associated colour buffer.

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


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.5.3 dev release

2008-06-26 Thread Robert Osfield
Hi All,

I have now merged several build fixes from Mathias that should help
things under Windows, could you all please do an svn update and let me
know how things now stand.

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


Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Wojciech Lewandowski
Thanks, Unfortunately it looks like DirectX only. Seems that Matrox 
TripleHead2Go gives similar effect in hardware spliter. I am loking for the 3 
monitor output without aditional tricks.  

Wojtek

- Original Message - 
  From: David Spilling 
  To: OpenSceneGraph Users 
  Sent: Thursday, June 26, 2008 1:24 PM
  Subject: Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors 
on 2 (or more) graphics cards ?


  Wojtek,

  You could see if SoftTH (http://www.kegetys.net/SoftTH/) works for you - my 
colleagues have had some good OpenGL experience with it (although not 
specifically with OSG).

  David



--


  ___
  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] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Robert Osfield
Hi Mario,

The compiler is just being a pain in the butt here, the code is 100%
safe on both 32bit and 64bit systems, context being everything.
Basically with VBO and PBO's you reuse parts of OpenGL functions that
take GLvoid*, but the actual data isn't a pointer in memory, but an
offset, and in this context we'll never need an offset that needs to
be greater than 32 bit.  The only question is really is how to shut up
the compiler from emiting this warning without messing around with
data types on the OSG side.

Robert.

On Wed, Jun 25, 2008 at 6:02 PM, Mario Valle [EMAIL PROTECTED] wrote:

 On x86_64 (Suse 10.3) the following warning appears at lines 431 and 600 of
 BufferObject.cpp :

 warning: cast to pointer from integer of different size

 In both places (few lines over), if I change the line:
   unsigned int offset = 0;
 to:
   unsigned long offset = 0;
 The warning goes away.
 Can anyone more knowledgeable than me confirm that the change is correct
 before I submit the change?
 Thanks!
mario


 --
 Ing. Mario Valle
 Data Analysis and Visualization Services |
 http://www.cscs.ch/~mvalle
 Swiss National Supercomputing Centre (CSCS)  | Tel:  +41 (91) 610.82.60
 v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
 /div

 ___
 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] problem with osg composite viewer

2008-06-26 Thread Robert Osfield
Hi David,

Could you please join the other threads that are currently discussing
CompositeViewer issues with add/removing views on the fly as I just
can't cope with multiple threads running on the same topic at the same
time.

Robert.

On Thu, Jun 26, 2008 at 11:56 AM, David _ [EMAIL PROTECTED] wrote:
 Hi

 running vista 32 with osg 2.4 stable release and visual studio 2005

 our app can switch between one view to multiple views of the same scene. We
 use compositeviewer for that and we´ve got some pagedlod terrains

 when we switch from one view to four, and during the switch the
 databasepageloader is loading things, then we get some white blocks on the
 terrain surface

 it seems that it looses all the pending petitions that were on the fly

 we´re doing the switch by killing all the views with
 osg_composite_viewer-removeView and then adding so much views as needed
 with osg_composite_viewer-addView. Any time addview is called, a new viewer
 is created and we pass the scene to it (root node of the scene tree)

 i guess that we´re loosing the databasepager when killing all the views and
 the and we´re loosing all the pending petitions either, or something like
 that

 any ideas how to avoid this??? do i have to keep at least one view alive???

 thanks











 
 Sigue los principales acontecimientos deportivos en directo. MSN Motor
 ___
 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] Windows build is broken (was: RE: Please test SVNofOpenSceneGraph in pre for2.5.3dev release)

2008-06-26 Thread Robert Osfield
Hi Mathias,

Which specific submissions/file is missing?

Robert.

On Thu, Jun 26, 2008 at 12:27 PM, Mathias Fröhlich
[EMAIL PROTECTED] wrote:

 Robert,

 On Thursday 26 June 2008 12:18, Robert Osfield wrote:
 Mathias is this now fixed with the latest changes from you?
 It compiles again, yes.
 Pulling Windows.h did break it.
 So forget that.

 Anyway, the no-windows-h tarball was not fully integrated. At least I can see
 still a diff to the tree where I extrected the change. The atomic
 implementation file is missing in some cases.

 GReetings

 Mathias

 --
 Dr. Mathias Fröhlich, science + computing ag, Software Solutions
 Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
 Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
 --
 Vorstand/Board of Management:
 Dr. Bernd Finkbeiner, Dr. Florian Geyer,
 Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
 Vorsitzender des Aufsichtsrats/
 Chairman of the Supervisory Board:
 Prof. Dr. Hanns Ruder
 Sitz/Registered Office: Tuebingen
 Registergericht/Registration Court: Stuttgart
 Registernummer/Commercial Register No.: HRB 382196


 ___
 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] Rendering to multiple graphics cards

2008-06-26 Thread Wojciech Lewandowski

Hi Bob,

Seems like you asked related question to mine. I would be very interested in 
your results. I tried to run osgviewer on two graphics boards withour 
success. But I was on XP and boards were different. I have not given up 
completely, hoping that Vista or identical cards may work. Then I have read 
your post and I see that you have exactly such setup. Does osgviewer outputs 
to monitors cards attached to both cards ?


Cheers,
Wojtek


Hi Bob,

Using the screenNum set to 0 or 1 should select the appropriate card.
When you run osgviewer on your system it should open up two
windows/two slave cameras automatically, press 'f' to toggle off full
screen to see the actual windows.

Robert.

On Tue, Jun 24, 2008 at 8:56 PM, Bob Balfour [EMAIL PROTECTED] wrote:

I also have an HP Windows (Vista) box with 2 Nvidia graphics cards
(independent, not SLI-configured). In order to configure two 
osg::cameras,

each one rendering to its own specific Nvidia card, how do you specify a
camera graphics context for a specific graphics card.  Is it simply
specifying the appropriate traits-screenNum, or does it take more than
that?  Has anyone done this in Windows Vista?

Thanks.

Bob.
--

Robert E. Balfour, Ph.D.
Exec. V.P.  CTO,  BALFOUR Technologies LLC
960 So. Broadway, Suite 108, Hicksville NY 11801
Phone: (516)513-0030  Fax: (516)513-0027  email: [EMAIL PROTECTED]
Solutions in four dimensions with fourDscape(R)

___
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] Anyone using OSG in Windows with 3 (or more) monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Robert Osfield
Hi Wojtek,

I have only experience of doing multi-card multi-display under Linux
and IRIX.  In my own Linux machine I've played with two graphics cards
with two outputs, and four outputs.  It works just fine once you
configure X11 appropriately.  For best performance use twin view so
that you can drive two outputs with a single graphics context on a
single card, then with two cards you'll have two contexts and four
outputs.

Mileage under Windows will vary of course, on the OSG side things
should work just fine, but

Robert.

On Thu, Jun 26, 2008 at 12:01 PM, Wojciech Lewandowski
[EMAIL PROTECTED] wrote:
 Hi everyone,

 Topic says it all. Is anyone using OSG on Windows with 2 or more graphics
 boards and more than 3 monitors ? If yes what graphics ? Is this possible
 with Linux ?

 We got the question from upper level whether it would be possible
 (theoretically)  to drive 3 or more displays from one machine. I said yes
 but practice shows different picture. At the moment we don't have acces to 2
 identical boards so I put one NVidia Geforce 8800 GTS and one GeForece 7800
 GTX into may machine. But osgviewer seems to run only on the graphics board
 which is attached to default main screen (set in graphics control dialog).

 Do others have more positive experiences ? If yes, what is your
 configuration ?

 Cheers,
 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] CMake build on OSX

2008-06-26 Thread Gerrick Bivins
Sorry for the late response. I didn't seem to get Stephan's reply. I'm using
the cmake that comes via macports which is version 2.4.8...
biv


On 6/26/08 4:08 AM, Robert Osfield [EMAIL PROTECTED] wrote:

 Hi Guys,
 
 We'll need to add a version check into the CMake build so that under
 OSX you need 2.6 or later.  Once I've done my trawl through the
 email/support backlog I'll look at this.  Others are welcome to dive
 in and implement it before I get to it ;-)
 
 Robert.
 
 On Tue, Jun 24, 2008 at 2:31 PM, Stephan Maximilian Huber
 [EMAIL PROTECTED] wrote:
 Hi Gerrick,
 
 Gerrick Bivins schrieb:
 
 I updated my osg build area to the latest and greatest and found that
 turning on applications and examples flags
 causes CMake to error out on Mac OSX 10.5.3. Turning these off allows for
 a
 successful compile/install. Is anyone else
 seeing this?
 
 What version of cmake are you using? Try updating cmake to 2.6, I had
 similar problems with cmake 2.4
 
 
 cheers,
 Stephan
 ___
 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] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Eric Sokolowsky
I have also used OSG on 64-bit Linux without any problems. I know nothing
about 64-bit Windows. On Mac OSX, OSG is not 64-bit capable because the
windowing functions used to glue OSG to the windowing system are
Carbon-based, and they are deprecated and are not available for 64-bit
programs. A few developers are working on transitioning away from Carbon
toward Cocoa for these bindings to enable 64-bit applications but progress
is slow. My recent work to finish the osgviewerCocoa example (written by
Eric Wing) is one small step in this direction.
-Eric
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Warning on 64bits: cast to pointer from integerofdifferent size

2008-06-26 Thread James Killian

I believe int used to be and then Microsoft mucked it up from 32 to 64, and 
thus you get the warning (for what it's worth I grew up with the 
Commodore/Amiga line of products, and had to join the dark side).

I use Vista 64 at work, and can say in confidence that osg works great in 32 
bit mode.  I have not tried to compile osg in 64bit yet, but I did see there is 
a 64bit platform available in cmake.  I code in x64 all the time at work now, 
and it is great to step into and see the new 64 bit assembly.  I no longer feel 
nauseous coding on the inferior 8088 processor.

James Killian

  - Original Message - 
  From: Peter Wraae Marino 
  To: OpenSceneGraph Users 
  Sent: Thursday, June 26, 2008 2:02 AM
  Subject: Re: [osg-users] Warning on 64bits: cast to pointer from 
integerofdifferent size


  Hi James,

  I always thought that int and unsigned int would be the best fit n-bit on 
the system? if it was an 8bit system
  then it would be 8bit int, if 32bit system then 32bit int or did I 
mis-understand something?

  and now that we are on the subject of 64bit.. I would like to ask a 
question... I considering buying a new
  computer and OS -- the OS (I know Robert will hate this).. is going to be 
Vista 64 bit and would like to 
  start coding using 64bit.. is OpenSceneGraph working with 64bit?

  regards,
  Peter


  On Thu, Jun 26, 2008 at 4:14 AM, James Killian [EMAIL PROTECTED] wrote:


I am not sure about the osg coding protocol, but for what we do at my work 
place we use size_t as the generic unsigned int... this will be unsigned long 
for win32 and __int64 for the x64 platform.  It is good to use as a generic 
container for local variables since it chooses the native size that fits best 
per platform.  size_t is great for pointer offsets too.

The part that is unclear to me is the osg protocol in regards to using 
things like size_t fpos_t etc...  osg has to be more generic to comply to all 
platforms, and this is something I have not needed to worry about (yet).


James Killian
- Original Message - From: Mario Valle [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Sent: Wednesday, June 25, 2008 12:02 PM
Subject: [osg-users] Warning on 64bits: cast to pointer from integer 
ofdifferent size 





  On x86_64 (Suse 10.3) the following warning appears at lines 431 and 600 
of BufferObject.cpp :

  warning: cast to pointer from integer of different size

  In both places (few lines over), if I change the line:
unsigned int offset = 0;
  to:
unsigned long offset = 0;
  The warning goes away.
  Can anyone more knowledgeable than me confirm that the change is correct
  before I submit the change?
  Thanks!
  mario


  -- 
  Ing. Mario Valle
  Data Analysis and Visualization Services | 
http://www.cscs.ch/~mvalle
  Swiss National Supercomputing Centre (CSCS)  | Tel:  +41 (91) 
610.82.60
  v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 
610.82.82
  /div

  ___
  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] Convert/use GIS coordinates

2008-06-26 Thread Jean-Sébastien Guay

Hi Norman,


gdalwarp -s_srs WGS84 -t_srs EPSG:32618 32V.tif 32V_warped.tif


That turns the image all black (no height values)...


You left the units=m  out of your proj4 string


I also tried

gdalwarp -s_srs WGS84 -t_srs +proj=utm +zone=32 +ellps=WGS84 
+datum=WGS84 +units=m +no_defs 32V.tif 32V_warped.tif


following the links you posted, and it also turns the image 
(32V_warped.tif) all black. Same result, so I guess both are equivalent, 
but not what I had in mind...


Anyways, I've sent the image to Glenn to see what he can find out.

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


[osg-users] osg::Texture2D and OpenGL textures working together

2008-06-26 Thread Steffen Kim
Hi everybody,

I have never used OpenGL and OpenSceneGraph together (and only a little bit of 
OpenGL alone), so I'm a little unsure of what the best way to solve the 
following problem is.

I want to use an API for interlacing different views on a scene for an 
autostereoscopic display.
The API uses OpenGL and basically takes an vector of GLuints containing the 
textures with the different views, interlaces them and renders the result into 
another texture referenced by a GLuint.

What I probably have to do is the following:

I have to calculate the different views I want to interlace and put them into 
the vector of GL textures.
How do I do this best?
Or can I convert GL textures wrapped by OSG as osg::Texture2D into the GL 
textures? Then I could render my views into osg::Texture2Ds and put them into 
the vector.
And how do I use the texture I get from the API in OSG afterwards? Can I 
somehow create an osg::Texture2D from it?

I would be very happy if someone could give me a hint what the best way to do 
this would look like or what I should search for to perhaps find some examples 
since I wasn't very successful until now.

Thanks a lot,
Steffen

Ihre Messenger, Communities und E-Mails jetzt in einem Programm!
WEB.DE MultiMessenger http://www.produkte.web.de/messenger/?did=3071

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


[osg-users] render video stream with dynamic size

2008-06-26 Thread hui
Hi, 
 
I am trying render video stream into osg texture, but the stream will change 
size during at least once, is there any machanism such like callback that I can 
use to tell the osg texture2D the change size? otherwise I have to save the 
texture pointer into my class but it not good. 
 
Thanks
 
Hui


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


[osg-users] Osgswig

2008-06-26 Thread Gerrick Bivins
Hi all,
Does anyone know if osgswig is being maintained anymore? Site on google code
doesn¹t seem like it¹s being updated anymore.
Has the project moved or is it just dead?
biv

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


Re: [osg-users] Convert/use GIS coordinates

2008-06-26 Thread Glenn Waldron
J-S,
Thanks for the files. I was able to use them to make it work. The problem
was that the original TIFF had go spatial information. So, I assigned it the
proper SRS with:

   gdal_translate -a_srs WGS84 32V.tif 32V.wgs84.tif

Then I was able to reproject it into UTM:

   gdalwarp -t_srs +proj=utm +zone=32 +datum=WGS84 +units=m 32V.wgs84.tif
32V.utm.tif

And finally a test run through osgdem:

   osgdem --terrain -d 32V.utm.tif -o out.osg

And that yields a good UTM dataset.
Glenn

On Thu, Jun 26, 2008 at 8:47 AM, Jean-Sébastien Guay 
[EMAIL PROTECTED] wrote:

 Hi Norman,

  gdalwarp -s_srs WGS84 -t_srs EPSG:32618 32V.tif 32V_warped.tif


 That turns the image all black (no height values)...

  You left the units=m  out of your proj4 string


 I also tried

 gdalwarp -s_srs WGS84 -t_srs +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84
 +units=m +no_defs 32V.tif 32V_warped.tif

 following the links you posted, and it also turns the image
 (32V_warped.tif) all black. Same result, so I guess both are equivalent, but
 not what I had in mind...

 Anyways, I've sent the image to Glenn to see what he can find out.

 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




-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Texture2D and OpenGL textures working together

2008-06-26 Thread Art Tevs
Hi Steffen,

 I have to calculate the different views I want to interlace
 and put them into the vector of GL textures.
 How do I do this best?

Change your algorithm to use shaders and combine your views in one shader 
program.

 Or can I convert GL textures wrapped by OSG as
 osg::Texture2D into the GL textures? Then I could render my
 views into osg::Texture2Ds and put them into the vector.
 And how do I use the texture I get from the API in OSG
 afterwards? Can I somehow create an osg::Texture2D from it?
 
You do not have to convert them, this is the same. There exists api methods to 
get texture id from the osg:Texture2D, which can be used in your OpenGL code. 
However I would suggest to use shaders and to bind the textures directly as 
input to the shader.

Best regards,
Art


 I would be very happy if someone could give me a hint what
 the best way to do this would look like or what I should
 search for to perhaps find some examples since I wasn't
 very successful until now.
 
 Thanks a lot,
 Steffen
 
 Ihre Messenger, Communities und E-Mails jetzt in einem
 Programm!
 WEB.DE MultiMessenger
 http://www.produkte.web.de/messenger/?did=3071
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  __
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Robert Osfield
Hi Wojtek,

On Thu, Jun 26, 2008 at 1:47 PM, Wojciech Lewandowski
[EMAIL PROTECTED] wrote:
 Thanks, Linux may be viable option for us. Twinviev may be also a good idea.
 I have not tried that, I tried 2 separate displays on 7800 GTX and one on
 8800. No banana. But maybe twinview will be different.

I recall a post for Jean-Sebastian Guay in the last couple of months
about Vista not supporting TwinView, perhaps I mis-read, but this is
what I recall.  Perhaps he'll be able to chip in.

In terms of mixing cards and number of displays on each, I've done
this myself with a 7800GT and 8800GTS and it worked fine, I did only
one window on each but having played with different configurations in
the past I am pretty confident that it'll work under Linux with the
NVidia drivers.  It's actually been working for quite a few years now.
 IRIX did this all in the early nineties too, all using X11 in pretty
well the same way as osgViewer drives it today.

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


Re: [osg-users] Warning on 64bits: cast to pointer fromintegerofdifferent size

2008-06-26 Thread Gordon Tomlinson
One issue to watch out for with code going from windows 32 bit to 64 bit
code

At times people use the trick of passing a pointers address around using
integers, which works a treat on win32, 

But doing this on 64bit system on windows will kill you...



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of James
Killian
Sent: Thursday, June 26, 2008 8:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Warning on 64bits: cast to pointer
fromintegerofdifferent size


 
I believe int used to be and then Microsoft mucked it up from 32 to 64, and
thus you get the warning (for what it's worth I grew up with the
Commodore/Amiga line of products, and had to join the dark side).
 
I use Vista 64 at work, and can say in confidence that osg works great in 32
bit mode.  I have not tried to compile osg in 64bit yet, but I did see there
is a 64bit platform available in cmake.  I code in x64 all the time at work
now, and it is great to step into and see the new 64 bit assembly.  I no
longer feel nauseous coding on the inferior 8088 processor.
 
James Killian
 

- Original Message - 
From: Peter Wraae Marino mailto:[EMAIL PROTECTED]  
To: OpenSceneGraph Users mailto:osg-users@lists.openscenegraph.org

Sent: Thursday, June 26, 2008 2:02 AM
Subject: Re: [osg-users] Warning on 64bits: cast to pointer from
integerofdifferent size

Hi James,
 
I always thought that int and unsigned int would be the best fit
n-bit on the system? if it was an 8bit system
then it would be 8bit int, if 32bit system then 32bit int or did
I mis-understand something?
 
and now that we are on the subject of 64bit.. I would like to ask a
question... I considering buying a new
computer and OS -- the OS (I know Robert will hate this).. is going
to be Vista 64 bit and would like to 
start coding using 64bit.. is OpenSceneGraph working with 64bit?
 
regards,
Peter


On Thu, Jun 26, 2008 at 4:14 AM, James Killian
[EMAIL PROTECTED] wrote:



I am not sure about the osg coding protocol, but for what we
do at my work place we use size_t as the generic unsigned int... this will
be unsigned long for win32 and __int64 for the x64 platform.  It is good to
use as a generic container for local variables since it chooses the native
size that fits best per platform.  size_t is great for pointer offsets too.

The part that is unclear to me is the osg protocol in
regards to using things like size_t fpos_t etc...  osg has to be more
generic to comply to all platforms, and this is something I have not needed
to worry about (yet).


James Killian
- Original Message - From: Mario Valle
[EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Sent: Wednesday, June 25, 2008 12:02 PM
Subject: [osg-users] Warning on 64bits: cast to pointer from
integer ofdifferent size 





On x86_64 (Suse 10.3) the following warning appears
at lines 431 and 600 of BufferObject.cpp :

warning: cast to pointer from integer of different
size

In both places (few lines over), if I change the
line:
  unsigned int offset = 0;
to:
  unsigned long offset = 0;
The warning goes away.
Can anyone more knowledgeable than me confirm that
the change is correct
before I submit the change?
Thanks!
mario


-- 
Ing. Mario Valle
Data Analysis and Visualization Services |
http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)  |
Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland |
Fax:  +41 (91) 610.82.82
/div

___
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] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Robert Osfield
Hi Eric,

Is there any actual reason why the Carbon API is not 64bit capable?
Was Cocoa itself not once built upon Carbon?  I'm totally perplexed by
Apple's decision on this, it just stuff's up lots of perfectly valid
apps from going 64bit for little gain.

As for a Cocoa implementation of GraphicsWindow and PixelBuffer, is
Cocoa fully threadable?  Are there other constraints that it'll apply
to the way we open, render to, and get events from the windows?

Robert.

On Thu, Jun 26, 2008 at 1:42 PM, Eric Sokolowsky [EMAIL PROTECTED] wrote:
 I have also used OSG on 64-bit Linux without any problems. I know nothing
 about 64-bit Windows. On Mac OSX, OSG is not 64-bit capable because the
 windowing functions used to glue OSG to the windowing system are
 Carbon-based, and they are deprecated and are not available for 64-bit
 programs. A few developers are working on transitioning away from Carbon
 toward Cocoa for these bindings to enable 64-bit applications but progress
 is slow. My recent work to finish the osgviewerCocoa example (written by
 Eric Wing) is one small step in this direction.
 -Eric


 ___
 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] Convert/use GIS coordinates

2008-06-26 Thread Jean-Sébastien Guay

Hi Glenn,

Thanks for the files. I was able to use them to make it work. The 
problem was that the original TIFF had geo spatial information.


OK, great, works here too. I'll have to take some notes so I don't make 
the same mistake in the future. I just assumed that since gdalinfo gave 
the lat/long in degrees, that the tiff was fine. Now I know that I need 
to look for the GEOGCS stuff.


Follow-up question: the resulting reprojected image has the terrain 
rotated a bit, which gives borders at the top-left and bottom-right of 
the image. This also gives terrain that looks higher in the generated 
terrain. Is there some way to remove that?


Finally, is there some way to know what the ocean level is (or can I 
just approximate it at z=0)?


Thanks a lot,

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] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Jean-Sébastien Guay

Hi Robert, Wojtek,


I recall a post for Jean-Sebastian Guay in the last couple of months
about Vista not supporting TwinView, perhaps I mis-read, but this is
what I recall.  Perhaps he'll be able to chip in.


I'm not sure what TwinView corresponds to, as it's more of a Linux/X term.

On Windows XP, we used to have the option to have multiple independent 
displays (say 2 displays of 1280x1024 - I guess that's TwinView on 
Linux?) or one combined display (2560x1024). The latter is called 
horizontal span (you can also do vertical span, 1280x2048 for example).


Now, on Vista, that option no longer exists (apparently because of the 
new driver model that Microsoft imposed on the video card manufacturers, 
but that may just be the manufacturers making excuses). The horizontal 
span and vertical span modes don't exist in Vista, only the multiple 
independent monitors.


Note that my experience is only on one video card, two monitors. I don't 
quite know how that scales to X video cards and Y monitors, and how it 
would work if the cards are of different types. Sorry.


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] Crash with CompositeViewer on Win32

2008-06-26 Thread Robert Osfield
Hi Serge,

What you are doing looks OK, and there are already OSG examples doing
similar things so it should work.  To track down what it might be
it'd worth trying out different threading models, and also try out
examples like osgthirdpersonview, osgcompositeviewer and osgcamera to
see if you can recreate the problems here, if so then others can try
it out at there end to see if problems occurs across OS/machines/build
combinations.

For one point of reference, the type of usage you are putting the OSG
through is something I've put the OSG through many times before
without coming across this problem.

Robert.

On Thu, Jun 26, 2008 at 1:57 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Hi all,

 I am having a crash with a CompositeViewer setup on Windows XP (VS 8 Sp1, 1
 GeForce card, SVN trunk). It is composed of 2 windows into 1 screen, with
 one context for each window. My threading model is DrawThreadPerContext.
 The crash takes place into OperationQueue, the _operations list has a
 corrupted element : the last one (the SwapBuffersOperation). The two
 graphics threads have their OperationQueue corrupted.

 So it crash line 75 into OperationThread.cpp because
 _currentOperationIterator points to a corrupted pointer.
 About my app, it just load the cow.osg, nothing else.

 Anyone have seen this problem before ? Or am I making something wrong on my
 viewer setup (my code is below) ?
 Thanks in advance !

 osgViewer::CompositeViewerviewer;
 osg::Node*root = osgDB::readNodeFile(cow.osg);

 // upper window
 {
 // Traits
 osg::ref_ptrosg::GraphicsContext::Traitstraits = new
 osg::GraphicsContext::Traits;

 traits-x = 300;
 traits-y = 40;
 traits-width = 600;
 traits-height = 300;
 traits-windowDecoration = true;
 traits-doubleBuffer = true;
 traits-sharedContext = 0;

 // Graphic context
 osg::ref_ptrosg::GraphicsContextgc =
 osg::GraphicsContext::createGraphicsContext(traits.get());
 osgViewer::View*view = new osgViewer::View;
 GLenumbuffer = traits-doubleBuffer
 ? GL_BACK : GL_FRONT;

 viewer.addView(view);
 view-getCamera()-setGraphicsContext(gc.get());
 view-getCamera()-setViewport(new osg::Viewport(0,0, traits-width,
 traits-height));
 view-getCamera()-setDrawBuffer(buffer);
 view-getCamera()-setReadBuffer(buffer);
 view-setSceneData(root);
 }
 // lower window
 {
 // Traits
 osg::ref_ptrosg::GraphicsContext::Traitstraits = new
 osg::GraphicsContext::Traits;

 traits-x = 300;
 traits-y = 375;
 traits-width = 600;
 traits-height = 480;
 traits-windowDecoration = true;
 traits-doubleBuffer = true;
 traits-sharedContext = 0;

 // Graphic context
 osg::ref_ptrosg::GraphicsContextgc =
 osg::GraphicsContext::createGraphicsContext(traits.get());
 osgViewer::View*view = new osgViewer::View;
 GLenumbuffer = traits-doubleBuffer
 ? GL_BACK : GL_FRONT;

 viewer.addView(view);
 view-getCamera()-setGraphicsContext(gc.get());
 view-getCamera()-setViewport(new osg::Viewport(0,0, traits-width,
 traits-height));
 view-getCamera()-setDrawBuffer(buffer);
 view-getCamera()-setReadBuffer(buffer);
 view-setSceneData(root);
 view-addEventHandler(new
 osgGA::StateSetManipulator(view-getCamera()-getOrCreateStateSet()));
 view-addEventHandler(new osgViewer::StatsHandler());
 }

 viewer.run();

 return (0);

 --
 Serge Lages
 http://www.tharsis-software.com
 ___
 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] render video stream with dynamic size

2008-06-26 Thread Robert Osfield
Hi Hui,

I believe the osg::Texture implementation should detect the change in
size and reallocat itself, so.. it should be a non issue.

Robert.

On Thu, Jun 26, 2008 at 2:09 PM, hui [EMAIL PROTECTED] wrote:
 Hi,



 I am trying render video stream into osg texture, but the stream will change
 size during at least once, is there any machanism such like callback that I
 can use to tell the osg texture2D the change size? otherwise I have to save
 the texture pointer into my class but it not good.



 Thanks



 Hui

 ___
 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] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Eric Sokolowsky
Apple has been encouraging developers to use Cocoa instead of Carbon for
several years now. I'm not privy to their reasons for this change, but it is
probably more marketing than technical, though it may be partially technical
as well.
This change will probably affect the way we render on the Mac. I haven't
fully wrapped my head around all this Cocoa stuff yet (Eric Wing has a much
better grasp on this) but once the windows are set up, OSG proper should
Just Work (TM). I tested compiling OSG for 64-bit using the x86_64 build
architecture and, as expected, the libraries built fine except for
osgViewer. I'm hoping that we can create a drop-in viewer using Cocoa
instead of the current Carbon-based viewer but I just don't know. I'm still
too new at OSX programming stuff to really give a good answer. Perhaps other
Mac developers can chime in here.

-Eric

On Thu, Jun 26, 2008 at 9:36 AM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Eric,

 Is there any actual reason why the Carbon API is not 64bit capable?
 Was Cocoa itself not once built upon Carbon?  I'm totally perplexed by
 Apple's decision on this, it just stuff's up lots of perfectly valid
 apps from going 64bit for little gain.

 As for a Cocoa implementation of GraphicsWindow and PixelBuffer, is
 Cocoa fully threadable?  Are there other constraints that it'll apply
 to the way we open, render to, and get events from the windows?

 Robert.

 On Thu, Jun 26, 2008 at 1:42 PM, Eric Sokolowsky [EMAIL PROTECTED]
 wrote:
  I have also used OSG on 64-bit Linux without any problems. I know nothing
  about 64-bit Windows. On Mac OSX, OSG is not 64-bit capable because the
  windowing functions used to glue OSG to the windowing system are
  Carbon-based, and they are deprecated and are not available for 64-bit
  programs. A few developers are working on transitioning away from Carbon
  toward Cocoa for these bindings to enable 64-bit applications but
 progress
  is slow. My recent work to finish the osgviewerCocoa example (written by
  Eric Wing) is one small step in this direction.
  -Eric
 

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


Re: [osg-users] LODScaleHandler crash on unref

2008-06-26 Thread Robert Osfield
Hi Amalric,


On Thu, Jun 26, 2008 at 11:54 AM, Robert Osfield
[EMAIL PROTECTED] wrote:
 Thanks for the example, I'll have a look at item 2 with this example
 and see how I get on.

I have your code compiled under Linux, and press 'k' to add a new view
works fine, the textures are always there as expected, deleting the
windows by pressing 'a' works fine too, but... when I press 'k' after
pressing 'a' all the new windows created have white cows.  So thumbs
up, I can recreate the bug, which is the first step towards.  I
haven't started debugging yet, but my guess is that the contextID's
aren't be incremented correctly for each new window once one window
has been deleted.

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


[osg-users] manipulating vertices from a node loaded by ReadNodeFile()

2008-06-26 Thread Bokhorst,Rene R.
Hey there,

I've been browsing the mail archive to find the answer to my question but I 
haven't found anything at all. I basically want to manipulate the vertices of a 
model loaded by the osgDB::ReadNodeFile() function. ReadNodeFile() returns a 
osg::Node. I was hoping this might actually be a osg::Geode, but apparently it 
isn't.

Reason I want to do this is because I have 1600 different building models. But 
all of these building models are already positioned in their correct position 
and rotation (instead of each building being built around 0,0,0). So basically 
if I load my 1600 models and all position them on 0,0,0 I have a complete and 
perfectly aligned town. I want to move every building back to 0,0,0 so that I 
can re-use them. I've already used osg to find their position by finding the 
center of their bounding box. And now I want to substract that position from 
the vertices of every building and save them. Anyone know how to achieve this?

Thank you in advance,

Rene



Op deze e-mail zijn de volgende voorwaarden van toepassing:

http://www.fontys.nl/disclaimer

The above disclaimer applies to this e-mail message.

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


Re: [osg-users] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Robert Osfield
Hi Eric,

Thanks for the info.  I too suspect forcing users to use Cocoa is a
marketing decision, or perhaps a market engineering decision.  For
cross platform API and applications it is really bad news to have more
non portable ways of doing things foisted upon you, it just
complicates the code and makes it harder to maintain.

W.r.t the actual implentation, going the route that Eric Wing took
with osgviewerCocoa is probably not helpful, we don't want to have a
Cocoa viewer at all, we really want just a GraphicWindowCocoa and
PixelBufferCocoa implementations that are hidden away inside the
implementation of osgViewer, something that is just quietly
implemented behinds the scenes and just does it stuff off creating
windows and getting events, but beyond this staying completely out of
the way.

Robert.

On Thu, Jun 26, 2008 at 2:46 PM, Eric Sokolowsky [EMAIL PROTECTED] wrote:
 Apple has been encouraging developers to use Cocoa instead of Carbon for
 several years now. I'm not privy to their reasons for this change, but it is
 probably more marketing than technical, though it may be partially technical
 as well.
 This change will probably affect the way we render on the Mac. I haven't
 fully wrapped my head around all this Cocoa stuff yet (Eric Wing has a much
 better grasp on this) but once the windows are set up, OSG proper should
 Just Work (TM). I tested compiling OSG for 64-bit using the x86_64 build
 architecture and, as expected, the libraries built fine except for
 osgViewer. I'm hoping that we can create a drop-in viewer using Cocoa
 instead of the current Carbon-based viewer but I just don't know. I'm still
 too new at OSX programming stuff to really give a good answer. Perhaps other
 Mac developers can chime in here.
 -Eric

 On Thu, Jun 26, 2008 at 9:36 AM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Eric,

 Is there any actual reason why the Carbon API is not 64bit capable?
 Was Cocoa itself not once built upon Carbon?  I'm totally perplexed by
 Apple's decision on this, it just stuff's up lots of perfectly valid
 apps from going 64bit for little gain.

 As for a Cocoa implementation of GraphicsWindow and PixelBuffer, is
 Cocoa fully threadable?  Are there other constraints that it'll apply
 to the way we open, render to, and get events from the windows?

 Robert.

 On Thu, Jun 26, 2008 at 1:42 PM, Eric Sokolowsky [EMAIL PROTECTED]
 wrote:
  I have also used OSG on 64-bit Linux without any problems. I know
  nothing
  about 64-bit Windows. On Mac OSX, OSG is not 64-bit capable because the
  windowing functions used to glue OSG to the windowing system are
  Carbon-based, and they are deprecated and are not available for 64-bit
  programs. A few developers are working on transitioning away from Carbon
  toward Cocoa for these bindings to enable 64-bit applications but
  progress
  is slow. My recent work to finish the osgviewerCocoa example (written by
  Eric Wing) is one small step in this direction.
  -Eric
 

 ___
 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] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Wojciech Lewandowski

Hi Robert  J-S,

You are right. I confused TwinView with HorizontalSpan. Since I have XP this
option is available. But does not work either.

Thanks for feedback,
Wojtek


Hi Robert, Wojtek,


I recall a post for Jean-Sebastian Guay in the last couple of months
about Vista not supporting TwinView, perhaps I mis-read, but this is
what I recall.  Perhaps he'll be able to chip in.


I'm not sure what TwinView corresponds to, as it's more of a Linux/X term.

On Windows XP, we used to have the option to have multiple independent
displays (say 2 displays of 1280x1024 - I guess that's TwinView on Linux?)
or one combined display (2560x1024). The latter is called horizontal
span (you can also do vertical span, 1280x2048 for example).

Now, on Vista, that option no longer exists (apparently because of the new
driver model that Microsoft imposed on the video card manufacturers, but
that may just be the manufacturers making excuses). The horizontal span
and vertical span modes don't exist in Vista, only the multiple
independent monitors.

Note that my experience is only on one video card, two monitors. I don't
quite know how that scales to X video cards and Y monitors, and how it
would work if the cards are of different types. Sorry.

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


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


Re: [osg-users] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Eric Sokolowsky
Okay. I haven't looked under the covers at osgViewer (having just moved to
osg 2.4 a month or so ago from osg 1.2), so it's good to know that those are
two pieces that need to be re-implemented. Are there any other pieces that
need to be looked at?
-Eric

On Thu, Jun 26, 2008 at 9:57 AM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Eric,

 Thanks for the info.  I too suspect forcing users to use Cocoa is a
 marketing decision, or perhaps a market engineering decision.  For
 cross platform API and applications it is really bad news to have more
 non portable ways of doing things foisted upon you, it just
 complicates the code and makes it harder to maintain.

 W.r.t the actual implentation, going the route that Eric Wing took
 with osgviewerCocoa is probably not helpful, we don't want to have a
 Cocoa viewer at all, we really want just a GraphicWindowCocoa and
 PixelBufferCocoa implementations that are hidden away inside the
 implementation of osgViewer, something that is just quietly
 implemented behinds the scenes and just does it stuff off creating
 windows and getting events, but beyond this staying completely out of
 the way.

 Robert.

 On Thu, Jun 26, 2008 at 2:46 PM, Eric Sokolowsky [EMAIL PROTECTED]
 wrote:
  Apple has been encouraging developers to use Cocoa instead of Carbon for
  several years now. I'm not privy to their reasons for this change, but it
 is
  probably more marketing than technical, though it may be partially
 technical
  as well.
  This change will probably affect the way we render on the Mac. I haven't
  fully wrapped my head around all this Cocoa stuff yet (Eric Wing has a
 much
  better grasp on this) but once the windows are set up, OSG proper should
  Just Work (TM). I tested compiling OSG for 64-bit using the x86_64 build
  architecture and, as expected, the libraries built fine except for
  osgViewer. I'm hoping that we can create a drop-in viewer using Cocoa
  instead of the current Carbon-based viewer but I just don't know. I'm
 still
  too new at OSX programming stuff to really give a good answer. Perhaps
 other
  Mac developers can chime in here.
  -Eric
 
  On Thu, Jun 26, 2008 at 9:36 AM, Robert Osfield 
 [EMAIL PROTECTED]
  wrote:
 
  Hi Eric,
 
  Is there any actual reason why the Carbon API is not 64bit capable?
  Was Cocoa itself not once built upon Carbon?  I'm totally perplexed by
  Apple's decision on this, it just stuff's up lots of perfectly valid
  apps from going 64bit for little gain.
 
  As for a Cocoa implementation of GraphicsWindow and PixelBuffer, is
  Cocoa fully threadable?  Are there other constraints that it'll apply
  to the way we open, render to, and get events from the windows?
 
  Robert.
 
  On Thu, Jun 26, 2008 at 1:42 PM, Eric Sokolowsky [EMAIL PROTECTED]
  wrote:
   I have also used OSG on 64-bit Linux without any problems. I know
   nothing
   about 64-bit Windows. On Mac OSX, OSG is not 64-bit capable because
 the
   windowing functions used to glue OSG to the windowing system are
   Carbon-based, and they are deprecated and are not available for 64-bit
   programs. A few developers are working on transitioning away from
 Carbon
   toward Cocoa for these bindings to enable 64-bit applications but
   progress
   is slow. My recent work to finish the osgviewerCocoa example (written
 by
   Eric Wing) is one small step in this direction.
   -Eric
  
 
  ___
  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] Crash with CompositeViewer on Win32

2008-06-26 Thread Serge Lages
Thanks for your reply Robert,

I was able to reproduce the crash with the example osgwindows (but not with
osgcompositeviewer). I launched the example with the cow.osg model in debug
mode, moved a little with the camera and gave a rotation, then waited a
couple of minutes (less than 5) and it crash for the same reason (the
OperationQueue has its SwapBuffersOperation corrupted) at the same location
(line 75 in OperationThread.cpp).

Anyone can try to reproduce it ? :)
I'll try to launch it in release mode to see if it also crash.

On Thu, Jun 26, 2008 at 3:43 PM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Serge,

 What you are doing looks OK, and there are already OSG examples doing
 similar things so it should work.  To track down what it might be
 it'd worth trying out different threading models, and also try out
 examples like osgthirdpersonview, osgcompositeviewer and osgcamera to
 see if you can recreate the problems here, if so then others can try
 it out at there end to see if problems occurs across OS/machines/build
 combinations.

 For one point of reference, the type of usage you are putting the OSG
 through is something I've put the OSG through many times before
 without coming across this problem.

 Robert.

 On Thu, Jun 26, 2008 at 1:57 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am having a crash with a CompositeViewer setup on Windows XP (VS 8 Sp1,
 1
  GeForce card, SVN trunk). It is composed of 2 windows into 1 screen, with
  one context for each window. My threading model is DrawThreadPerContext.
  The crash takes place into OperationQueue, the _operations list has a
  corrupted element : the last one (the SwapBuffersOperation). The two
  graphics threads have their OperationQueue corrupted.
 
  So it crash line 75 into OperationThread.cpp because
  _currentOperationIterator points to a corrupted pointer.
  About my app, it just load the cow.osg, nothing else.
 
  Anyone have seen this problem before ? Or am I making something wrong on
 my
  viewer setup (my code is below) ?
  Thanks in advance !
 
  osgViewer::CompositeViewerviewer;
  osg::Node*root = osgDB::readNodeFile(cow.osg);
 
  // upper window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 40;
  traits-width = 600;
  traits-height = 300;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  }
  // lower window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 375;
  traits-width = 600;
  traits-height = 480;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  view-addEventHandler(new
  osgGA::StateSetManipulator(view-getCamera()-getOrCreateStateSet()));
  view-addEventHandler(new osgViewer::StatsHandler());
  }
 
  viewer.run();
 
  return (0);
 
  --
  Serge Lages
  http://www.tharsis-software.com
  ___
  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




-- 
Serge Lages
http://www.tharsis-software.com
___

Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.5.3 dev release

2008-06-26 Thread Jean-Sébastien Guay

Hi Robert,


I have now merged several build fixes from Mathias that should help
things under Windows, could you all please do an svn update and let me
know how things now stand.


I sent an updated src/OpenThreads/win32/CMakeLists.txt file that fixes a 
small omission to get it to build on Windows. With that fix it builds 
correctly.


Thanks, and thanks to Mathias for fixing the windows.h issue.

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] Convert/use GIS coordinates

2008-06-26 Thread Glenn Waldron
On Thu, Jun 26, 2008 at 9:35 AM, Jean-Sébastien Guay 
[EMAIL PROTECTED] wrote:

 Hi Glenn,

  Thanks for the files. I was able to use them to make it work. The problem
 was that the original TIFF had geo spatial information.


 OK, great, works here too. I'll have to take some notes so I don't make the
 same mistake in the future. I just assumed that since gdalinfo gave the
 lat/long in degrees, that the tiff was fine. Now I know that I need to look
 for the GEOGCS stuff.

 Follow-up question: the resulting reprojected image has the terrain
 rotated a bit, which gives borders at the top-left and bottom-right of the
 image. This also gives terrain that looks higher in the generated terrain.
 Is there some way to remove that?


Well, since a UTM zone represents a vertical slice of the earth, it won't
be perfectly rectangular -- in the northern hemisphere, the width at the
north side (in meters) is less than the width at the south. Since a TIFF is
rectangular, you see borders. The only way to compensate would be to stitch
multiple areas together and then crop out a rectangular region. Does that
answer your question?

I don't know what you mean by higher.

Finally, is there some way to know what the ocean level is (or can I just
 approximate it at z=0)?


Z=0 at sea level.

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] manipulating vertices from a node loaded by ReadNodeFile()

2008-06-26 Thread Rajesh Karnik
hello Rene,

I am not sure i have understood your query..

But probably attaching a Matrix Transform as a parent should work.

Regards,
Rajesh.

On Thu, Jun 26, 2008 at 3:56 PM, Bokhorst,Rene R. [EMAIL PROTECTED]
wrote:

 Hey there,

 I've been browsing the mail archive to find the answer to my question but I
 haven't found anything at all. I basically want to manipulate the vertices
 of a model loaded by the osgDB::ReadNodeFile() function. ReadNodeFile()
 returns a osg::Node. I was hoping this might actually be a osg::Geode, but
 apparently it isn't.

 Reason I want to do this is because I have 1600 different building models.
 But all of these building models are already positioned in their correct
 position and rotation (instead of each building being built around 0,0,0).
 So basically if I load my 1600 models and all position them on 0,0,0 I have
 a complete and perfectly aligned town. I want to move every building back to
 0,0,0 so that I can re-use them. I've already used osg to find their
 position by finding the center of their bounding box. And now I want to
 substract that position from the vertices of every building and save them.
 Anyone know how to achieve this?

 Thank you in advance,

 Rene


 
 Op deze e-mail zijn de volgende voorwaarden van toepassing:

 http://www.fontys.nl/disclaimer

 The above disclaimer applies to this e-mail message.
 
 ___
 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] manipulating vertices from a node loaded by ReadNodeFile()

2008-06-26 Thread Paul Melis

Hoi,

Bokhorst,Rene R. wrote:

I've been browsing the mail archive to find the answer to my question but I 
haven't found anything at all. I basically want to manipulate the vertices of a 
model loaded by the osgDB::ReadNodeFile() function. ReadNodeFile() returns a 
osg::Node. I was hoping this might actually be a osg::Geode, but apparently it 
isn't.
  
A Geode is a subclass of Node,  but osgDB::readNodeFile always returns a 
Node*. You can check if you actually get back a Geode by doing a dynamic 
cast, e.g.


osg::Node* node = osgDB::readNodeFile(...);
osg::Geode* geode = dynamic_castosg::Geode*(node);
if (geode) { // it's a Geode... }

Reason I want to do this is because I have 1600 different building models. But 
all of these building models are already positioned in their correct position 
and rotation (instead of each building being built around 0,0,0). So basically 
if I load my 1600 models and all position them on 0,0,0 I have a complete and 
perfectly aligned town. I want to move every building back to 0,0,0 so that I 
can re-use them. I've already used osg to find their position by finding the 
center of their bounding box. And now I want to substract that position from 
the vertices of every building and save them. Anyone know how to achieve this?
  
You can try to add a separate MatrixTransform above each building's root 
node and set its DataVariance to STATIC followed by running 
osgUtil::Optimizer on the subgraph with option 
FLATTEN_STATIC_TRANSFORMS. If all other transforms in the subgraph also 
have static variance then this should 'push' the transform into the 
vertices by transforming them to their final positions. You can then 
save each building's subgraph with writeNodeFile()


Paul

Thank you in advance,

Rene



Op deze e-mail zijn de volgende voorwaarden van toepassing:

http://www.fontys.nl/disclaimer

The above disclaimer applies to this e-mail message.

___
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] manipulating vertices from a node loaded by ReadNodeFile()

2008-06-26 Thread Serge Lages
Hi Rene,

From you geodes, take the drawables, cast them into geometries and recover
the vertex list with getVertexArray.

On Thu, Jun 26, 2008 at 3:56 PM, Bokhorst,Rene R. [EMAIL PROTECTED]
wrote:

 Hey there,

 I've been browsing the mail archive to find the answer to my question but I
 haven't found anything at all. I basically want to manipulate the vertices
 of a model loaded by the osgDB::ReadNodeFile() function. ReadNodeFile()
 returns a osg::Node. I was hoping this might actually be a osg::Geode, but
 apparently it isn't.

 Reason I want to do this is because I have 1600 different building models.
 But all of these building models are already positioned in their correct
 position and rotation (instead of each building being built around 0,0,0).
 So basically if I load my 1600 models and all position them on 0,0,0 I have
 a complete and perfectly aligned town. I want to move every building back to
 0,0,0 so that I can re-use them. I've already used osg to find their
 position by finding the center of their bounding box. And now I want to
 substract that position from the vertices of every building and save them.
 Anyone know how to achieve this?

 Thank you in advance,

 Rene


 
 Op deze e-mail zijn de volgende voorwaarden van toepassing:

 http://www.fontys.nl/disclaimer

 The above disclaimer applies to this e-mail message.
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Osgswig

2008-06-26 Thread Alberto Luaces
El Jueves 26 Junio 2008ES 15:18:56 Gerrick Bivins escribió:
 Hi all,
 Does anyone know if osgswig is being maintained anymore? Site on google
 code doesn¹t seem like it¹s being updated anymore.
 Has the project moved or is it just dead?
 biv

Well, I think it is up and running, Jeremy has made an update to SVN just half 
an hour ago: :)

$ svn log -rHEAD

r62 | cubicool | 2008-06-26 15:55:31 +0200 (jue, 26 jun 2008) | 2 lines

Committing before changing everything over to using SizableInterface.


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


[osg-users] Build fails on Windows

2008-06-26 Thread Paul Martz
Current SVN fails to build under Windows, though the errors are different
from what we saw earlier this week. Errors now are undefined symbols when
the osg library links. Below is a greatly abbreviated list of the errors
spewed out by VS2005. Looks like the Atomic header file has some kind of
problem with declaring its class as exported. I'll take a look.

This build is from about 12:30 GMT.
   -Paul
 

2-- Build started: Project: osg, Configuration: Debug Win32 --

2Linking...

2 Creating library C:\OSGDev\OSG\bld\lib\Debug\..\osgd.lib and object
C:\OSGDev\OSG\bld\lib\Debug\..\osgd.exp

2VertexProgram.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2View.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Viewport.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2dxtctool.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TextureRectangle.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TransferFunction.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Transform.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Uniform.obj : error LNK2019: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ) referenced
in function public: static char const * __cdecl
osg::Uniform::getTypename(enum osg::Uniform::Type)
([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@@Z)

2Texture2D.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Texture2DArray.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Texture3D.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TextureCubeMap.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexGenNode.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexMat.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Texture.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Texture1D.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexEnv.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexEnvCombine.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexEnvFilter.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2TexGen.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Stats.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2Stencil.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL PROTECTED]@@QBEIXZ)

2StencilTwoSided.obj : error LNK2001: unresolved external symbol
__declspec(dllimport) public: __thiscall OpenThreads::Atomic::operator
unsigned int(void)const  ([EMAIL 

Re: [osg-users] Convert/use GIS coordinates

2008-06-26 Thread Jean-Sébastien Guay

Hi Glenn,

Well, since a UTM zone represents a vertical slice of the earth, it 
won't be perfectly rectangular -- in the northern hemisphere, the width 
at the north side (in meters) is less than the width at the south. Since 
a TIFF is rectangular, you see borders. The only way to compensate would 
be to stitch multiple areas together and then crop out a rectangular 
region. Does that answer your question?


I gathered that was the reason, but didn't know what could be done about 
it.



I don't know what you mean by higher.


Well, the places where there is no data get rendered as higher terrain 
than the bottom of the ocean... Sorry for the simplistic terms.



Z=0 at sea level.


Excellent. 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] Particles being culled

2008-06-26 Thread Charles Cossé
CG:
One more try: I'm just looking at old code b/c I know I've had a
similar problem...and I didn't notice the next line of my code:

ps-SetAlignVectorX(osg::Vec3(0.,1.,0.));

Hopefully that'll make a difference.
-Charles

On Thu, Jun 26, 2008 at 6:24 AM, Charles Cossé [EMAIL PROTECTED] wrote:
 Sorry, then, I tried ... maybe you should repost so Robert sees it.
 Charles

 On Thu, Jun 26, 2008 at 3:08 AM, CG [EMAIL PROTECTED] wrote:
 Hi Charles,

 I've tried the setParticleAlignment and it didn't work.

 Regards,
 Cg

 
 Date: Wed, 25 Jun 2008 23:28:53 -0600
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] Particles being culled

 try:
 ps-setParticleAlignment(osgParticle::ParticleSystem::BILLBOARD);


 On Wed, Jun 25, 2008 at 11:23 PM, CG [EMAIL PROTECTED] wrote:
  Hi Charles,
 
  Thanks for the reply, what are the settings for the eye point facing?
 
  Regards,
  Cg
 
  
  Date: Wed, 25 Jun 2008 23:18:07 -0600
  From: [EMAIL PROTECTED]
  To: osg-users@lists.openscenegraph.org
  Subject: Re: [osg-users] Particles being culled
 
  I think the default for particle systems is that particles are little
  billboards which always face the viewer's eye point. It looks like
  you've undone that setting somehow, and that the billboards are facing
  different directions.
 
  On Wed, Jun 25, 2008 at 11:07 PM, CG [EMAIL PROTECTED] wrote:
   Hi all,
  
   I'm trying to simulate a smoke trail emitting from a moving tank by
   using
   Joseph's codes but some particles are being culled (see attached
   picture).
   Any ideas what are the causes?
  
   Thanks,
  
   Cg
  
   
   Make the most of what you can do on your PC and the Web, just the way
   you
   want. Windows Live
   ___ BR   osg-users
   mailing list
   osg-users@lists.openscenegraph.org
  
  
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
 
 
  --
  AsymptopiaSoftware | [EMAIL PROTECTED]
  www.asymptopia.org
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
  
  Share your beautiful moments with Photo Gallery. Windows Live Photo
  Gallery
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



 --
 AsymptopiaSoftware | [EMAIL PROTECTED]
 www.asymptopia.org
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 
 Chat online and in real-time with friends and family! Windows Live Messenger
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





 --
 AsymptopiaSoftware | [EMAIL PROTECTED]
  www.asymptopia.org




-- 
AsymptopiaSoftware | [EMAIL PROTECTED]
 www.asymptopia.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Osgswig

2008-06-26 Thread Jeremy Moles
Hmm, I'm not so sure he's talking about osgWidget, but it's not dead
either--just moving incredibly slow with the unforseeably increased
workload of late. By the time I get home from my REAL job, I rarely have
the energy for hobby development (i.e., osgWidget).

Also, if someone would be so kind as to hack my laptop and uninstall the
slew of games I play when I _could_ be working on osgWidget, I'd be EVER
SO GRATEFUL. :)

On Thu, 2008-06-26 at 16:10 +0200, Alberto Luaces wrote:
 El Jueves 26 Junio 2008ES 15:18:56 Gerrick Bivins escribió:
  Hi all,
  Does anyone know if osgswig is being maintained anymore? Site on google
  code doesn¹t seem like it¹s being updated anymore.
  Has the project moved or is it just dead?
  biv
 
 Well, I think it is up and running, Jeremy has made an update to SVN just 
 half 
 an hour ago: :)
 
 $ svn log -rHEAD
 
 r62 | cubicool | 2008-06-26 15:55:31 +0200 (jue, 26 jun 2008) | 2 lines
 
 Committing before changing everything over to using SizableInterface.
 
 
 ___
 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] Advice on Rendering Streaming video

2008-06-26 Thread spowers

Hey uli,

What do you mean by getting a nice image from that is a b??ch? Is the
image quality reduced?

Not sure what de-bayer algorithm I'm going to use. I have the source for
one that we have used before but I'm not sure how it will work on a
shader.

Is there an example of an osg::PixelBufferObject being used to stream to
an Image?? How is one attached to the image?

Also, about the non-power of 2 textures can I make the texture
scaled to the nearest power of two and just modify the texture
coordinates on the quad? Will doing this avoid the CPU scalling of the
texture?
 

-Steve
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ulrich
Hertlein
Sent: Wednesday, June 25, 2008 10:19 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Advice on Rendering Streaming video

[EMAIL PROTECTED] wrote:
 I've already set up an orthographic2D view that will look at a quad
 which will display the texture. The shader will then convert the
texture
 into RGB and do the whitebalance.  I am also able to swap the texture
 back and forth and maintain decent frame rates but the textures I'm
 using to test are only 64x64 pixels (tank.rgba and water.rgba) and I'm
 wondering if it would be too slow (30fps) to use the same method for
 1000x1000 pixel images.

The texture bandwidth isn't likely to be a problem, keep in mind that
bayer 
images are only 1/3 of an RGB image of the same size.

Things to look out for is to use non-power-of-two textures or texture
rectangles 
to avoid CPU scaling of the image.

You'll also want to attach a osg::PixelBufferObject to the osg::Image.

Unfortunately getting a nice image from that is a b??ch and the shaders
can get 
complex pretty fast, the number of texture lookups is probably the most 
expensive op.  What de-bayer algorithms are you looking at?

Cheers,
/uli
___
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] Crash with CompositeViewer on Win32

2008-06-26 Thread Serge Lages
Hi again,

I've reproduced it in release mode, but I had to wait a much longer time
(around 20 and 30 minutes), still with the osgwindows example.

On Thu, Jun 26, 2008 at 4:03 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Thanks for your reply Robert,

 I was able to reproduce the crash with the example osgwindows (but not with
 osgcompositeviewer). I launched the example with the cow.osg model in debug
 mode, moved a little with the camera and gave a rotation, then waited a
 couple of minutes (less than 5) and it crash for the same reason (the
 OperationQueue has its SwapBuffersOperation corrupted) at the same location
 (line 75 in OperationThread.cpp).

 Anyone can try to reproduce it ? :)
 I'll try to launch it in release mode to see if it also crash.


 On Thu, Jun 26, 2008 at 3:43 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 What you are doing looks OK, and there are already OSG examples doing
 similar things so it should work.  To track down what it might be
 it'd worth trying out different threading models, and also try out
 examples like osgthirdpersonview, osgcompositeviewer and osgcamera to
 see if you can recreate the problems here, if so then others can try
 it out at there end to see if problems occurs across OS/machines/build
 combinations.

 For one point of reference, the type of usage you are putting the OSG
 through is something I've put the OSG through many times before
 without coming across this problem.

 Robert.

 On Thu, Jun 26, 2008 at 1:57 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am having a crash with a CompositeViewer setup on Windows XP (VS 8
 Sp1, 1
  GeForce card, SVN trunk). It is composed of 2 windows into 1 screen,
 with
  one context for each window. My threading model is DrawThreadPerContext.
  The crash takes place into OperationQueue, the _operations list has a
  corrupted element : the last one (the SwapBuffersOperation). The two
  graphics threads have their OperationQueue corrupted.
 
  So it crash line 75 into OperationThread.cpp because
  _currentOperationIterator points to a corrupted pointer.
  About my app, it just load the cow.osg, nothing else.
 
  Anyone have seen this problem before ? Or am I making something wrong on
 my
  viewer setup (my code is below) ?
  Thanks in advance !
 
  osgViewer::CompositeViewerviewer;
  osg::Node*root = osgDB::readNodeFile(cow.osg);
 
  // upper window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 40;
  traits-width = 600;
  traits-height = 300;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  }
  // lower window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 375;
  traits-width = 600;
  traits-height = 480;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  view-addEventHandler(new
  osgGA::StateSetManipulator(view-getCamera()-getOrCreateStateSet()));
  view-addEventHandler(new osgViewer::StatsHandler());
  }
 
  viewer.run();
 
  return (0);
 
  --
  Serge Lages
  http://www.tharsis-software.com
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 

Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Roger James


 
 On Windows XP, we used to have the option to have multiple independent
 displays (say 2 displays of 1280x1024 - I guess that's TwinView on
 Linux?) or one combined display (2560x1024). The latter is called
 horizontal span (you can also do vertical span, 1280x2048 for example).
 
 Now, on Vista, that option no longer exists (apparently because of the
 new driver model that Microsoft imposed on the video card manufacturers,
 but that may just be the manufacturers making excuses). The horizontal
 span and vertical span modes don't exist in Vista, only the multiple
 independent monitors.
 
[Roger James] 
You may want to try this. I have a Vista Box with an nVidia card it. If I
launch the nVidia control panel I can get to a pane that says set up
multiple displays and on this I can select configured independently from
each other (Dualview). If I select this then bring up the standard vista
display settings dialog I can drag the monitor representations around to
give either side by side or one on top the other orientation of the
monitors. Launching osgViewer without any parameters gives a display which
is spread over both monitors.  In fact this is my normal desktop setup. The
default OSG behaviour is usually quite annoying as models centre on the join
between monitors so I modify this by setting the OSG_SCREEN environment
variable to 0 in which case osgViewer only uses one of the monitors. So
whatever the default setting is causes the OpenGL rendering context to be
spread over both displays.

I have no idea what happens with more than two screens :-)

Roger

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


[osg-users] Paged simulation and culling performance drop

2008-06-26 Thread Lionel Lagarde




Hi, 

I'm running a simulation on a huge paged database. It works fine, the
frame rate is 
constant, and the terrain is paged correctly.

But sometimes, the culling pass takes ages to complete. Most of the
time, it takes
2/3 ms to complete, but it could take up to 40/60 ms to build the
render graph/stage.

Anybody has an idea on what happen ?

I've measured the time passed in the PagedLOD database requests but it
is very small.

When the problem appears, the RenderLeaf cache of the CullVisitor
doesn't grow dramatically
and the number of nodes traversed by the CullVisitor doesn't change. 

I don't know where to look now.
Please help ...



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


Re: [osg-users] Crash with CompositeViewer on Win32

2008-06-26 Thread Serge Lages
Forget to mention, in release before the crash I had this message :

Warning: deleting still referenced object 0145DFF8 of type 'class
osg::Referenced *'
 the final reference count was 2, memory corruption possible.

It seems someone force the delete of the SwapBuffersOperation...

On Thu, Jun 26, 2008 at 4:30 PM, Serge Lages [EMAIL PROTECTED] wrote:

 Hi again,

 I've reproduced it in release mode, but I had to wait a much longer time
 (around 20 and 30 minutes), still with the osgwindows example.


 On Thu, Jun 26, 2008 at 4:03 PM, Serge Lages [EMAIL PROTECTED]
 wrote:

 Thanks for your reply Robert,

 I was able to reproduce the crash with the example osgwindows (but not
 with osgcompositeviewer). I launched the example with the cow.osg model in
 debug mode, moved a little with the camera and gave a rotation, then waited
 a couple of minutes (less than 5) and it crash for the same reason (the
 OperationQueue has its SwapBuffersOperation corrupted) at the same location
 (line 75 in OperationThread.cpp).

 Anyone can try to reproduce it ? :)
 I'll try to launch it in release mode to see if it also crash.


 On Thu, Jun 26, 2008 at 3:43 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 What you are doing looks OK, and there are already OSG examples doing
 similar things so it should work.  To track down what it might be
 it'd worth trying out different threading models, and also try out
 examples like osgthirdpersonview, osgcompositeviewer and osgcamera to
 see if you can recreate the problems here, if so then others can try
 it out at there end to see if problems occurs across OS/machines/build
 combinations.

 For one point of reference, the type of usage you are putting the OSG
 through is something I've put the OSG through many times before
 without coming across this problem.

 Robert.

 On Thu, Jun 26, 2008 at 1:57 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Hi all,
 
  I am having a crash with a CompositeViewer setup on Windows XP (VS 8
 Sp1, 1
  GeForce card, SVN trunk). It is composed of 2 windows into 1 screen,
 with
  one context for each window. My threading model is
 DrawThreadPerContext.
  The crash takes place into OperationQueue, the _operations list has a
  corrupted element : the last one (the SwapBuffersOperation). The two
  graphics threads have their OperationQueue corrupted.
 
  So it crash line 75 into OperationThread.cpp because
  _currentOperationIterator points to a corrupted pointer.
  About my app, it just load the cow.osg, nothing else.
 
  Anyone have seen this problem before ? Or am I making something wrong
 on my
  viewer setup (my code is below) ?
  Thanks in advance !
 
  osgViewer::CompositeViewerviewer;
  osg::Node*root =
 osgDB::readNodeFile(cow.osg);
 
  // upper window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 40;
  traits-width = 600;
  traits-height = 300;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  }
  // lower window
  {
  // Traits
  osg::ref_ptrosg::GraphicsContext::Traitstraits = new
  osg::GraphicsContext::Traits;
 
  traits-x = 300;
  traits-y = 375;
  traits-width = 600;
  traits-height = 480;
  traits-windowDecoration = true;
  traits-doubleBuffer = true;
  traits-sharedContext = 0;
 
  // Graphic context
  osg::ref_ptrosg::GraphicsContextgc =
  osg::GraphicsContext::createGraphicsContext(traits.get());
  osgViewer::View*view = new
 osgViewer::View;
  GLenumbuffer =
 traits-doubleBuffer
  ? GL_BACK : GL_FRONT;
 
  viewer.addView(view);
  view-getCamera()-setGraphicsContext(gc.get());
  view-getCamera()-setViewport(new osg::Viewport(0,0,
 traits-width,
  traits-height));
  view-getCamera()-setDrawBuffer(buffer);
  view-getCamera()-setReadBuffer(buffer);
  view-setSceneData(root);
  view-addEventHandler(new
  osgGA::StateSetManipulator(view-getCamera()-getOrCreateStateSet()));
  view-addEventHandler(new 

Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jean-Sébastien Guay wrote:
 Hi Robert, Wojtek,
 
 I recall a post for Jean-Sebastian Guay in the last couple of months
 about Vista not supporting TwinView, perhaps I mis-read, but this is
 what I recall.  Perhaps he'll be able to chip in.
 
 I'm not sure what TwinView corresponds to, as it's more of a Linux/X term.
 

That's incorrect. Twinview is Nvidia's term for their multi-monitor
support on their GPUs: http://www.nvidia.com/object/feature_twinview.html

 On Windows XP, we used to have the option to have multiple independent
 displays (say 2 displays of 1280x1024 - I guess that's TwinView on
 Linux?) 

On Linux you can have two basic setups:

- - Separate displays (Non-Twinview, no XINERAMA extension) - you are
running two X servers independently and they function as two heads.
Essentially you could plug two mice and two keyboards and have two
workplaces out of one machine. With regards to OpenGL it means that you
have two independent displays (:0 and :1) with two OpenGL contexts and
you cannot move windows from one to the other.

- - Twinview (nVidia term)/XINERAMA (generic Xorg term) - you have a large
desktop spanning several monitors (doesn't need to be only two) and the
spanning can be both horizontal and vertical. From the X's point of view
you have a single display (:0 ) with large resolution (usually doubled
in one direction, but the screens may have different resolutions - I
have 1280x1024 + 800x600 for HMD on my desk)

Now Nvidia's Twinview can span only on a single GPU - you can have two
screens connected to one graphic card (or how many your card supports).
However, if I remember correctly it is possible to configure X to create
a large logical display over two (or more) supported graphic cards, even
from different manufacturers, where each screen shows a viewport of a
larger desktop. No idea whether this works with OpenGL correctly, though
- - never had such a setup.

A more common setup is to have two GPUs each driving two screens (not
SLI! That is something else!) and each of the GPU having its own X
server and display number. Then you cannot move windows between the
displays and you will have two OpenGL contexts.

Regards,

Jan


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

iD8DBQFIY6srn11XseNj94gRAiI8AJ0XbQ/PrUujTqKhuj6TTo123hC9PgCfXntY
6FPe1t3fgdbVACylyLLfor0=
=I6u6
-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] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Robert Osfield
Hi Eric,

On Thu, Jun 26, 2008 at 3:01 PM, Eric Sokolowsky [EMAIL PROTECTED] wrote:
 Okay. I haven't looked under the covers at osgViewer (having just moved to
 osg 2.4 a month or so ago from osg 1.2), so it's good to know that those are
 two pieces that need to be re-implemented. Are there any other pieces that
 need to be looked at?

What you'll probably need to do is create the headers:

  include/osgViewer/api/Cocoa/GraphicsWindowCocoa
  include/osgViewer/api/Cocoa/PixelBufferCocoa

And source files:

  src/osgViewer/GraphicsWindowCocoa.cpp
  src/osgViewer/PixelBufferCocoa.cpp

Then add the Cocoa option into the Cmake build system.

You'll also need to implement a WindowSystemInterface and register
this with osg::GraphicsContext via a proxy.  Have a look at the
GraphicsWindowCarbon/X11.cpp for guidance on this.  This interface
class acts as the factory that creates the actual
windows/pixelbuffers, and is implemented in the .cpp.

All your platform specific stuff will be in the headers and associated
.cpp's and won't propagate any further than this so its as self
contained as it code be, and the build system - hopefully CMake will
be malluable enough to handle the Objective C compilation.

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


Re: [osg-users] Build fails on Windows

2008-06-26 Thread Robert Osfield
On Thu, Jun 26, 2008 at 3:10 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hi Paul,

 Current SVN fails to build under Windows, though the errors are different
 from what we saw earlier this week. Errors now are undefined symbols when
 the osg library links. Below is a greatly abbreviated list of the errors
 spewed out by VS2005. Looks like the Atomic header file has some kind of
 problem with declaring its class as exported. I'll take a look.

 I just sent an updated src/OpenThreads/win32/CMakeLists.txt that fixes this.
 The problem was not exports, but that the Atomic.cpp implementation file was
 not added to the project (hence not built nor linked into OpenThreads.lib).

My fault I'm afraid, I missed checking in all of Mathias changes.
Note to self, don't try to do more than one thing at once.

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


Re: [osg-users] Convert/use GIS coordinates

2008-06-26 Thread Glenn Waldron
On Thu, Jun 26, 2008 at 10:08 AM, Jean-Sébastien Guay 
[EMAIL PROTECTED] wrote:

 Hi Glenn,

  Well, since a UTM zone represents a vertical slice of the earth, it
 won't be perfectly rectangular -- in the northern hemisphere, the width at
 the north side (in meters) is less than the width at the south. Since a TIFF
 is rectangular, you see borders. The only way to compensate would be to
 stitch multiple areas together and then crop out a rectangular region. Does
 that answer your question?


 I gathered that was the reason, but didn't know what could be done about
 it.


I don't know how to do it from the command line. I use Global Mapper for
this sort of thing. I find it to be an indispensable companion to VPB for
prepping source data.

 I don't know what you mean by higher.


Well, the places where there is no data get rendered as higher terrain than
 the bottom of the ocean... Sorry for the simplistic terms.


Right, gdalwarp fills in the reprojection gaps with Z=0. Not sure whether
gdalwarp can insert custom no-data values (-dstnodata maybe?)

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Warning on 64bits: cast to pointer from integer of different size

2008-06-26 Thread Mike Garrity
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Robert Osfield
 Sent: Thursday, June 26, 2008 9:37 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Warning on 64bits: cast to pointer from integer of 
 different size

 Hi Eric,

 Is there any actual reason why the Carbon API is not 64bit capable?

They did have a beta of a 64b carbon. The problem is that carbon is
very broad and has a lot of crufty old corners. Getting from the
80% of the beta to 100% was looking pretty impossible. That left them
with a choice between saying carbon wasn't supported or saying it
was supported with this long, confusing list of exceptions and bugs.
They went with the first choice.

 Was Cocoa itself not once built upon Carbon?

No, it wasn't.

 I'm totally perplexed by
 Apple's decision on this, it just stuff's up lots of perfectly valid
 apps from going 64bit for little gain.

 As for a Cocoa implementation of GraphicsWindow and PixelBuffer, is
 Cocoa fully threadable?  Are there other constraints that it'll apply
 to the way we open, render to, and get events from the windows?

 Robert.


As to the original question, we run OSG on 64bit Vista, XP, Solaris,
OSX, and Linux with no problems, but we don't use the osgViewer
library or a couple of the plugins. The core libraries work fine
on all of those platforms. It would be nice to clean up some more
of the warnings.

-Mike Garrity

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


Re: [osg-users] Anyone using OSG in Windows with 3 (or more)monitors on 2 (or more) graphics cards ?

2008-06-26 Thread Jean-Sébastien Guay

Hi Jan,


I'm not sure what TwinView corresponds to, as it's more of a Linux/X term.


That's incorrect. Twinview is Nvidia's term for their multi-monitor
support on their GPUs: http://www.nvidia.com/object/feature_twinview.html


Sorry, I just assumed as I hadn't seen the term used on Windows. In the 
Nvidia control panel on Vista, it's called Dualview... (just checked) 
So that's why I went into that lengthy explanation. I didn't want to use 
terms that weren't clearly defined for everyone.


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


[osg-users] Seeking OSG texture mapping application

2008-06-26 Thread Judie
Hi,

Can 3D Studio Max import osg, apply texture and export it back to osg?
If not then is there another modeling software that can? I am having
problems generating texture coordinates for a model representing a
machined work peice. If there is an algorithm for apply textures that
would also be appreciated.

Thanks,

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


Re: [osg-users] Crash with CompositeViewer on Win32

2008-06-26 Thread Robert Osfield
Hi Serge,

On Thu, Jun 26, 2008 at 3:43 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Forget to mention, in release before the crash I had this message :

 Warning: deleting still referenced object 0145DFF8 of type 'class
 osg::Referenced *'
  the final reference count was 2, memory corruption possible.

 It seems someone force the delete of the SwapBuffersOperation...

It's sounds like reference counting has going awol on this object,
this particular object is no different than any other
osg::GraphicsOperation/osg::Operation, and which just subclass from
osg::Referenced.  There isn't any codes that do explicit calls to
delete graphics operations, including SwapBuffersOperation, and as I
believe all usage of them will be going via osg::ref_ptr, so it does
sound like for some reason reference count is getting corrupted.
Could this be related to Mathias' recent changes?

Could you tweak your OpenThreads/Config so that OpenThreads/OSG build
using the old slow Mutexed reference counting?

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


[osg-users] About MixinVector

2008-06-26 Thread Paul Martz
Can someone please explain the MixinVector change and why it was necessary?
Also, please explain the name MixinVector -- what, exactly, is a Mixin?
If this is a design pattern, I must admit I'm not familiar with it.
 
I checked the archives and I see no discussion of this change, not even the
submission. I see only Robert's change log post when requesting 2.5.3
testing, which shows this change was added on June 19.
 
I can see that the change apparently fixes some memory leaks. Are there test
cases that reproduce the problem? If so, can someone post them?
 
If it seems that I'm overly concerned, it is because I feel that one of
OSG's strengths is its reliance on STL. So, changes that move OSG away from
STL worry me a bit. This change replaces a well-tested std::vector with a
completely new MixinVector and therefore invalidates all testing on OSG's
Array classes done over the past 10 years.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Build fails on Windows

2008-06-26 Thread Paul Martz
OpenThreads and the osg library now build/link successfully. Thanks, J-S.
Currently rebuilding the rest of the tree...
   -Paul

 
 On Thu, Jun 26, 2008 at 3:10 PM, Jean-Sébastien Guay 
 [EMAIL PROTECTED] wrote:
  Hi Paul,
 
  Current SVN fails to build under Windows, though the errors are 
  different from what we saw earlier this week. Errors now are 
  undefined symbols when the osg library links. Below is a greatly 
  abbreviated list of the errors spewed out by VS2005. Looks 
 like the 
  Atomic header file has some kind of problem with declaring 
 its class as exported. I'll take a look.
 
  I just sent an updated src/OpenThreads/win32/CMakeLists.txt 
 that fixes this.
  The problem was not exports, but that the Atomic.cpp implementation 
  file was not added to the project (hence not built nor 
 linked into OpenThreads.lib).
 
 My fault I'm afraid, I missed checking in all of Mathias changes.
 Note to self, don't try to do more than one thing at once.
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

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


Re: [osg-users] Paged simulation and culling performance drop

2008-06-26 Thread Robert Osfield
Hi Lionel,

Which version of the OSG are you using?

Prior to rewrite of the DatabasePager in 2.5.x and SVN the pager used
to have occasional problems in high cull times when large numbers of
database requests backed up, which meant that the search operation
that was done on each frame for each fresh request could become costly
- it was in effect an O(N squared) relationship.  When only a small
number of requests are outstanding the cost is small, but when they
pile up the cull cost quickly grows.

In new DatabasePager there code has been refactored so there isn't a
search required anymore, so the wayward cull costs are avoided
completely.

Robert.

On Thu, Jun 26, 2008 at 3:43 PM, Lionel Lagarde [EMAIL PROTECTED] wrote:
 Hi,

 I'm running a simulation on a huge paged database. It works fine, the frame
 rate is
 constant, and the terrain is paged correctly.

 But sometimes, the culling pass takes ages to complete. Most of the time, it
 takes
 2/3 ms to complete, but it could take up to 40/60 ms to build the render
 graph/stage.

 Anybody has an idea on what happen ?

 I've measured the time passed in the PagedLOD database requests but it is
 very small.

 When the problem appears, the RenderLeaf cache of the CullVisitor doesn't
 grow dramatically
 and the number of nodes traversed by the CullVisitor doesn't change.

 I don't know where to look now.
 Please help ...

 ___
 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 take a picture of my scene?

2008-06-26 Thread Carlos Sanches
 Hi friends !
I 'd want to save the frames of my OSG scene in jpg or bmp or any other
format.
What function do this ?
How do I do this ??

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


Re: [osg-users] Please test SVN of OpenSceneGraph in pre for 2.5.3 dev release

2008-06-26 Thread Mathias Fröhlich

Hi,

On Thursday 26 June 2008 16:02, Jean-Sébastien Guay wrote:
 Thanks, and thanks to Mathias for fixing the windows.h issue.
Thanks for your patience and sorry for the inconvinience ...

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] How to take a picture of my scene?

2008-06-26 Thread Robert Osfield
Hi Carlos,

This has been discussed lots in the last month so have a look through
the osg-users archives.

Robert.

On Thu, Jun 26, 2008 at 3:59 PM, Carlos Sanches [EMAIL PROTECTED] wrote:


  Hi friends !
 I 'd want to save the frames of my OSG scene in jpg or bmp or any other
 format.
 What function do this ?
 How do I do this ??

 thank you !

 ___
 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] Windows build is broken (was: RE: Please test SVNofOpenSceneGraph in pre for2.5.3dev release)

2008-06-26 Thread Robert Osfield
On Thu, Jun 26, 2008 at 4:01 PM, Mathias Fröhlich
[EMAIL PROTECTED] wrote:

 Hi Robert,

 On Thursday 26 June 2008 14:29, Robert Osfield wrote:
 Which specific submissions/file is missing?
 May by I have forgotten them, I will send ...

 src/OpenThreads/win32/CMakeLists.txt
 src/OpenThreads/sproc/CMakeLists.txt

Sorry about this, changes 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] osgViewer X11 path under OSX now added.. ?

2008-06-26 Thread Eric Sokolowsky
I'm presently compiling the X11 path. Will let you know what happens.

On Fri, Jun 20, 2008 at 3:20 PM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi All,

 To help out an present3D end working under OSX, who was having
 problems with the Carbon version of osgViewer, I have added an option
 OSG_WINDOW_SYSTEM into Cmake to allow the CMake to compile either the
 X11 or Carbon support into osgViewer.  The default setting for
 OSG_WINDOWING_SYSTEM is Carbon under OSX, but changing this to X11 via
 ccmake should allow you to build osgViewer using X11.

 As yet this isn't tested, as I don't have a Mac to test against, so...
 could a friendly Mac developer try out the above setting to see if its
 possible to build with X11 under OSX with the SVN version of the OSG.

 Thanks in advance for you help,
 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] About MixinVector

2008-06-26 Thread Paul Martz
Thanks for the info, as this is not at all clear from the code comments at
the top of the class.

Where does the name MixinVector come from? Why was it chosen? It is not
descriptive, at least, not to me... :-( 
   -Paul 


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Robert Osfield
 Sent: Thursday, June 26, 2008 9:08 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] About MixinVector
 
 Hi Paul,
 
 The change to use the MixinVector is to avoid using multiple 
 inheritance with std::vector, as std::vector doesn't have a 
 virtual destructor the destruction of the vector is undefined 
 w.r.t the C++ Standard.  What the MixinVector does is to 
 change the setup so that classes that subclass from 
 MixinVector have a std::vector, rather than inherit from 
 std::vector.
 
 The MixinVector is still uses std::vector internally, and 
 delegates all functionality to std::vector via inline 
 methods.  So the OSG itself isn't moving away from STL in any 
 way, just working with it more correctly/robustly.
 
 Robert.
 
 On Thu, Jun 26, 2008 at 3:55 PM, Paul Martz 
 [EMAIL PROTECTED] wrote:
  Can someone please explain the MixinVector change and why 
 it was necessary?
  Also, please explain the name MixinVector -- what, 
 exactly, is a Mixin?
  If this is a design pattern, I must admit I'm not familiar with it.
 
  I checked the archives and I see no discussion of this change, not 
  even the submission. I see only Robert's change log post when 
  requesting 2.5.3 testing, which shows this change was added 
 on June 19.
 
  I can see that the change apparently fixes some memory leaks. Are 
  there test cases that reproduce the problem? If so, can 
 someone post them?
 
  If it seems that I'm overly concerned, it is because I feel 
 that one 
  of OSG's strengths is its reliance on STL. So, changes that 
 move OSG 
  away from STL worry me a bit. This change replaces a well-tested 
  std::vector with a completely new MixinVector and therefore 
  invalidates all testing on OSG's Array classes done over 
 the past 10 years.
 
  Paul Martz
  Skew Matrix Software LLC
  http://www.skew-matrix.com
  +1 303 859 9466
 
  ___
  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-opensce
negraph.org

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


Re: [osg-users] Paged simulation and culling performance drop

2008-06-26 Thread Lionel Lagarde




I'm using OSG 2.0. 

I agree that database requests could be very costly when the request
queue (or the to compile list or the to merge list) are too big.
But I've benched the requestNodeFile method and it doesn't take
too much time.


Robert Osfield wrote:

  Hi Lionel,

Which version of the OSG are you using?

Prior to rewrite of the DatabasePager in 2.5.x and SVN the pager used
to have occasional problems in high cull times when large numbers of
database requests backed up, which meant that the search operation
that was done on each frame for each fresh request could become costly
- it was in effect an O(N squared) relationship.  When only a small
number of requests are outstanding the cost is small, but when they
pile up the cull cost quickly grows.

In new DatabasePager there code has been refactored so there isn't a
search required anymore, so the wayward cull costs are avoided
completely.

Robert.

On Thu, Jun 26, 2008 at 3:43 PM, Lionel Lagarde [EMAIL PROTECTED] wrote:
  
  
Hi,

I'm running a simulation on a huge paged database. It works fine, the frame
rate is
constant, and the terrain is paged correctly.

But sometimes, the culling pass takes ages to complete. Most of the time, it
takes
2/3 ms to complete, but it could take up to 40/60 ms to build the render
graph/stage.

Anybody has an idea on what happen ?

I've measured the time passed in the PagedLOD database requests but it is
very small.

When the problem appears, the RenderLeaf cache of the CullVisitor doesn't
grow dramatically
and the number of nodes traversed by the CullVisitor doesn't change.

I don't know where to look now.
Please help ...

___
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] osgViewer X11 path under OSX now added.. ?

2008-06-26 Thread Robert Osfield
On Thu, Jun 26, 2008 at 4:12 PM, Eric Sokolowsky [EMAIL PROTECTED] wrote:
 I'm presently compiling the X11 path. Will let you know what happens.

Thanks, look forward to hearing how you get.

Just had a thought, is there a chance that the X11 path will work fine
as a 64bit build?  X11 has supported 64bit build on others platforms
for long long long time so there wouldn't be a technical reason in
terms of the API, just a build/platform support issue that need
addressing properly.  If this does work then perhaps it'd be a short
term workaround for 64bit support under OSX.

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


Re: [osg-users] About MixinVector

2008-06-26 Thread Jean-Sébastien Guay

Hi Paul,

Can someone please explain the MixinVector change and why it was 
necessary? Also, please explain the name MixinVector -- what, exactly, 
is a Mixin? If this is a design pattern, I must admit I'm not familiar 
with it.


To add to what Robert said:

http://en.wikipedia.org/wiki/Mixin

In object-oriented programming languages, a mixin is a class that 
provides a certain functionality to be inherited by a subclass, but is 
not meant to stand alone. Inheriting from a mixin is not a form of 
specialization but is rather a means to collect functionality. A class 
may inherit most or all of its functionality by inheriting from one or 
more mixins through multiple inheritance.


In effect, since MixinVector has a std::vector, and has operations that 
just redirect calls to the internal std::vector (like operator[], 
push_back() etc.), and then the Array classes inherit from MixinVector 
instead of directly from std::vector, the functionality is the same, but 
it removes the problem that was caused by std::vector's destructor not 
being virtual.


It's debatable whether std::vector was just not meant to be subclassed 
or whether it was an oversight when designing it... The previous use 
would certainly have been valid if the destructor had been declared virtual.


Hope this helps,

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] Paged simulation and culling performance drop

2008-06-26 Thread Robert Osfield
On Thu, Jun 26, 2008 at 4:20 PM, Lionel Lagarde [EMAIL PROTECTED] wrote:
 I'm using OSG 2.0.

 I agree that database requests could be very costly when the request
 queue (or the to compile list or the to merge list) are too big.
 But I've benched the requestNodeFile method and it doesn't take
 too much time.

I doubt you are coming up against a different issue than the one that
I profiled and then fixed during the refactor of DatabasePager, so I
would expect moving the latest OSG in SVN or 2.5.1 would fix you
performance issue.   Moving from 2.0 to the latest OSG should not be
difficult, as the vast majority of the API has not been changed.

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


Re: [osg-users] Paged simulation and culling performance drop

2008-06-26 Thread Lionel Lagarde




I know that I have to moving to the latest OSG but
I can't do it for the moment.

I will look at the SVN DatabasePager request method.

Robert Osfield wrote:

  On Thu, Jun 26, 2008 at 4:20 PM, Lionel Lagarde [EMAIL PROTECTED] wrote:
  
  
I'm using OSG 2.0.

I agree that database requests could be very costly when the request
queue (or the to compile list or the to merge list) are too big.
But I've benched the requestNodeFile method and it doesn't take
too much time.

  
  
I doubt you are coming up against a different issue than the one that
I profiled and then fixed during the refactor of DatabasePager, so I
would expect moving the latest OSG in SVN or 2.5.1 would fix you
performance issue.   Moving from 2.0 to the latest OSG should not be
difficult, as the vast majority of the API has not been changed.

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] LODScaleHandler crash on unref

2008-06-26 Thread amalric alexandre
Hi Robert,

1st Problem :

In fact the resize event is well propagated with the correct parameters
(good width and height values). The problem is not in the resize event, but
with the thread wich is responsible of calling frame().

After a long googling on threading with MFC, I've found there is 2 types of
thread :
- Worker thread
- User Interface thread

My application, derived from osgViewerMFC, used the _beginthread(cOSG::Render,
0, mOSG); function, so the Render function could be considered as a worker
thread. And the MFC message loop isn't apparently compatible with thoses
working threads.

So I decided to create a UI (User Interface) thread based on CWinthread, and
in the Run function I call frame(). The resize are well handled and
everything is working fine, except a litlle flicking in resizing.

If I have the time I'll make a little example osgViewerMFC with this kind of
thread.

2nd Problem :

 I'm glad that you have reproduced the bug, loosing texture seems to me
connected to context ID too, but I hadn't the time to go further.


2008/6/26 Robert Osfield [EMAIL PROTECTED]:

 Hi Amalric,


 On Thu, Jun 26, 2008 at 11:54 AM, Robert Osfield
 [EMAIL PROTECTED] wrote:
  Thanks for the example, I'll have a look at item 2 with this example
  and see how I get on.

 I have your code compiled under Linux, and press 'k' to add a new view
 works fine, the textures are always there as expected, deleting the
 windows by pressing 'a' works fine too, but... when I press 'k' after
 pressing 'a' all the new windows created have white cows.  So thumbs
 up, I can recreate the bug, which is the first step towards.  I
 haven't started debugging yet, but my guess is that the contextID's
 aren't be incremented correctly for each new window once one window
 has been deleted.

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




-- 
Alexandre AMALRIC Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Freetype doesn't show up in .net2005

2008-06-26 Thread Kim C Bale
Dear all,


I'm having problems getting CMake 2.4 to find the appropriate files for
the freetype plugin in the osg2.4 distribution.

I was under the impression that as long as the 3rdParty folder was
specified correctly, CMake should find the necessary freetype files to
add it to the .Net solution. However CMake tells me freetype files
cannot be found.

So I decided to add them manually, I deleted the cache to start a fresh
and pointed CMake to the following directories.

FREETYPE_INCLUDE_DIR_freetype2 = C:/Build/OpenSceneGraph
2.4/3rdParty/include/freetype
FREETYPE_INCLUDE_DIR_ft2build = C:/Build/OpenSceneGraph
2.4/3rdParty/include/
FREETYPE_LIBRARY_DEBUG = C:/Build/OpenSceneGraph
2.4/3rdParty/lib/freetype219_D.lib

And yet the plugin still doesn't appear in my .net solution.

Can anyone see my error? Or point me in the direction of a post that
can?

Forgive me if this has already been posted, I had a good look beforehand
but couldn't find an answer to my problem.


Cheers!


Kim.*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] API configurations in aseparateConfig include file

2008-06-26 Thread Jean-Sébastien Guay

Hello James,

Well I'll give Cmake 2.6 another shot.  I tried it too early before and 
it had some strange behavior.  Hopefully now since a lot of people are 
using it I'll feel a bit more confident that it will work.  I may get 
back with you on the Install workflow, but I'll need to see how 2.6 
looks first.


I just did a compile using CMake 2.4.8 to generate VS8 project files, 
and all went well. The _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED config 
was chosen, and the build completed correctly.


I had also done the same with CMake 2.6 earlier (after Robert committed 
the fixes to not include windows.h in the Atomic header) and it worked 
just as well. So you could use either 2.4.8 or 2.6. Can you please try 
it and see if all is well on your side?


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] How to take a picture of my scene?

2008-06-26 Thread Rick Pingry
(If you are using windows), I also use the Print Screen button, which
effectively copis the image to the clip-board.

-- Rick

On Thu, Jun 26, 2008 at 11:08 AM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Carlos,

 This has been discussed lots in the last month so have a look through
 the osg-users archives.

 Robert.

 On Thu, Jun 26, 2008 at 3:59 PM, Carlos Sanches [EMAIL PROTECTED] wrote:
 
 
   Hi friends !
  I 'd want to save the frames of my OSG scene in jpg or bmp or any other
  format.
  What function do this ?
  How do I do this ??
 
  thank you !
 
  ___
  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




-- 
 Rick
Check us out at http://fringe-online.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer X11 path under OSX now added.. ?

2008-06-26 Thread Stephan Maximilian Huber

Robert Osfield schrieb:

Just had a thought, is there a chance that the X11 path will work fine
as a 64bit build?  X11 has supported 64bit build on others platforms
for long long long time so there wouldn't be a technical reason in
terms of the API, just a build/platform support issue that need
addressing properly.  If this does work then perhaps it'd be a short
term workaround for 64bit support under OSX.


X11 / 64 bit should work on OSX. The quicktime-plugin will fail, because 
quicktime is not 64bit safe, too.


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


Re: [osg-users] LODScaleHandler crash on unref

2008-06-26 Thread Robert Osfield
On Thu, Jun 26, 2008 at 4:42 PM, amalric alexandre
[EMAIL PROTECTED] wrote:
 2nd Problem :

  I'm glad that you have reproduced the bug, loosing texture seems to me
 connected to context ID too, but I hadn't the time to go further.

I've tracked down the problem to the reuse of contextID, something in
itself was working correctly, but the subgraphs below the cameras
weren't been modified to account for the removal of the previous
contexts.  The OSG already has a mechanism to help clean up a the
scene graph to avoid these types of problems, but in this particular
usage combination the required relaseGLObjects() wasn't been called.

I have now changed the GraphicsContext::removedCamera() method to it
works out which subgraphs need the releaseGLObjects() called upon,
this fixes the texture/display lists issues you've seen.  The changed
GraphicsContext.cpp is attached, and also checked in to SVN.  Could
you please try it out at your end and confirm whether it's fixed.

Robert.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/

#include stdlib.h

#include osg/GraphicsContext
#include osg/Camera
#include osg/View
#include osg/GLObjects

#include osg/FrameBufferObject
#include osg/Program
#include osg/Drawable
#include osg/FragmentProgram
#include osg/VertexProgram

#include OpenThreads/ReentrantMutex

#include osg/Notify

#include map
#include sstream
#include algorithm

using namespace osg;

/


// Use a static reference pointer to hold the window system interface.
// Wrap this within a function, in order to control the order in which
// the static pointer's constructor is executed. 

static ref_ptrGraphicsContext::WindowingSystemInterface windowingSystemInterfaceRef()
{
static ref_ptrGraphicsContext::WindowingSystemInterface s_WindowingSystemInterface;
return s_WindowingSystemInterface;
}


//  GraphicsContext static method implementations

void GraphicsContext::setWindowingSystemInterface(WindowingSystemInterface* callback)
{
ref_ptrGraphicsContext::WindowingSystemInterface wsref = windowingSystemInterfaceRef();
wsref = callback;
osg::notify(osg::INFO)GraphicsContext::setWindowingSystemInterface() wsref.get()\twsrefstd::endl;
}

GraphicsContext::WindowingSystemInterface* GraphicsContext::getWindowingSystemInterface()
{
ref_ptrGraphicsContext::WindowingSystemInterface wsref = windowingSystemInterfaceRef();
osg::notify(osg::INFO)GraphicsContext::getWindowingSystemInterface() wsref.get()\twsrefstd::endl;
return wsref.get();
}

GraphicsContext* GraphicsContext::createGraphicsContext(Traits* traits)
{
ref_ptrGraphicsContext::WindowingSystemInterface wsref = windowingSystemInterfaceRef();
if ( wsref.valid())
{
// catch any undefined values.
if (traits) traits-setUndefinedScreenDetailsToDefaultScreen();

return wsref-createGraphicsContext(traits);
}
else
return 0;
}

GraphicsContext::ScreenIdentifier::ScreenIdentifier():
displayNum(0),
screenNum(0) {}

GraphicsContext::ScreenIdentifier::ScreenIdentifier(int in_screenNum):
displayNum(0),
screenNum(in_screenNum) {}

GraphicsContext::ScreenIdentifier::ScreenIdentifier(const std::string in_hostName,int in_displayNum, int in_screenNum):
hostName(in_hostName),
displayNum(in_displayNum),
screenNum(in_screenNum) {}

std::string GraphicsContext::ScreenIdentifier::displayName() const
{
std::stringstream ostr;
ostrhostName:displayNum.screenNum;
return ostr.str();
}

void GraphicsContext::ScreenIdentifier::readDISPLAY()
{
const char* ptr = 0;
if ((ptr=getenv(DISPLAY)) != 0)
{
setScreenIdentifier(ptr);
}
}

void GraphicsContext::ScreenIdentifier::setScreenIdentifier(const std::string displayName)
{
std::string::size_type colon = displayName.find_last_of(':');
std::string::size_type point = displayName.find_last_of('.');

if (point!=std::string::npos  
colon==std::string::npos  
point  colon) point = std::string::npos;

if (colon==std::string::npos)
{
hostName = ;
}
else
{
hostName = displayName.substr(0,colon);
}

std::string::size_type startOfDisplayNum = (colon==std::string::npos) ? 0 : colon+1;
std::string::size_type endOfDisplayNum = (point==std::string::npos) ?  displayName.size() : point;

 

  1   2   >