Re: [osg-users] Freetype plugin doesn't appear in project list (OSG 2.4.0, Cmake 2.4.8, Vista, Vis C++ express)

2008-05-07 Thread David Spilling
Paul, Mattias,


 Your PS suggest that you have old cache entries.


Not really sure how this could happen. The install sequence was as clean as
it could get - almost literally format drive, install OS, install compiler,
install CMake, unzip OSG and 3rdParty stuff, generate build files with
CMake, build OSG


 Find3rdPartyDependencies.cmake... searches for zlib before zlib1 and
 libpng before libpng13.


Not sure why it didn't find zlib1 and libpng13 then.  (Sounds like a similar
issue to the freetype bit not really finding freetype235, otherwise
_freetype2 and _ft2build would have been set).

All slightly wierd CMake behaviour , but all fixed now through manually
pointing _freetype and _ft2build. Maybe something to do with non-standard
3rdParty location?

Thanks for help,

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


Re: [osg-users] Cuda Sample

2008-05-07 Thread Robert Osfield
Hi Ariel,

I don't know of any published OSG/Cuda examples, I'd love to see one though :-)

As how to tackle it I can't help as I haven't read the Cuda docs, I'd
suggest starting with OpenGL/Cuda integration examples and then see
how these might be mapped across to OSG constructs.

Robert.

On Sun, May 4, 2008 at 10:57 AM, Ariel Hutterer [EMAIL PROTECTED] wrote:
 Hi:
 I try to run cuda from osg.
 I looking for a sample how to do this.
 Specificly i want to Bind the FBO and textures with cuda.
 Some one can help me?
 Or if some body can help me to share arrays between cuda-shaders-osg.
 Thanks
 Ariel
 ___
  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] Halfedge Mesh Data-Structure

2008-05-07 Thread Robert Osfield
Hi Janick,

On Mon, May 5, 2008 at 9:36 AM, Janick Martinez
[EMAIL PROTECTED] wrote:
  Hi, Deriving your own class from osg::Drawable, you can have any
   internal draw implementation with your own datastructures. See the
   osgteapot example. -- mew


  That seems to be a nice way to do the rendering, thank you!

  But what about interaction considerations? How would I,
  for example, allow a user to specify points on the mesh
  by just clicking on the surface? Is a ray - triangle
  intersection test also possible the same way?

The OpenGL rendering is done via overriding the
Drawable::drawImplementation(..) as illustrated by
the osgteapot example.

To do CPU based interaction you'll such as intersection testing you'll need to
implement the Drawable::accept(AttributeFunctor) and
accept(PrimitiveFunctor) methods.   Have a look at
src/osg/ShapeDrawable.cpp and src/osg/Geometry.cpp to see how they
implement these methods.

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


Re: [osg-users] Aircraft Getting Invisible ?

2008-05-07 Thread Robert Osfield
Hi Umit,

I'd guess that you are probably coming across a near plane clipping
issue, rather than a culling issue.  Unfortunately its easy to confuse
clipping with culling when you just see disappearing, but its too very
different mechanisms at play so its important to work out whether it
is clipping or culling that is at play.  The way to know is study how
the object disappears - does it slowly get eaten away or does it just
pop out of existance - the former will be near plane clipping down on
the GPU, the later most likely culling.

Both clipping and culling problems can be caused by incorrect bounding
volume computations - if your plane was a custom drawable or you'd
just a shader to modify its geometry then this might be a candidate.
If you are using standard osg::Geometry then its very unlikely that
culling as at fault as the OSG's native codes for computing bounding
volumes and doing cull testing are very well established and tested.

My guess is that most likely you have an issue with near plane
clipping, and if you have a very large model extents this can be very
common - as the far plane will be pushed out so far.  The OSG does
have support for cluster culling, and this will be used by default in
geocentric databases built by VPB, this will cull out tiles beyond the
horizon line and pull in the max far distance, but it doesn't solve
all the potential problems as the furtherest tile can still be a long
way out.   If you want to pull it in further you could manually
control it but then you'll need to make sure you use glFog/osg::Fog on
the terrain to make sure that you can only see up to a set maximum
distanace.   If you use this trick then disabling the compute of near
far will be required.   You should be able to enable the far clipping
plane as well.

The other thing you can do is to reduce the NearFarRatio by setting
setNearFarRatio to something lower than it's default of 0.0005f ( see
src/osg/CullSettings.cpp's setDefaults() method where it's set.)

Robert.

Robert.

2008/5/5 ümit uzun [EMAIL PROTECTED]:

  Hi all,

  I have an aircraft. I resize it and add scene on the earth but it get 
 invisible when I resized much smaller like that,

  float size = 0.0005f / mAircraftModel.get( )-getBound( ).radius( );

  mAircraftTransform-setDataVariance( osg::Object::STATIC );
  mAircraftTransform-setMatrix( osg::Matrix::scale( size, size, size ) *
  osg::Matrix::rotate( osg::DegreesToRadians( 90.0f ), 1.0f, 0.0f, 0.0f ) *
  osg::Matrix::rotate( osg::DegreesToRadians( -90.0f ), 0.0f, 0.0f, 1.0f ) *
  osg::Matrix::rotate( osg::DegreesToRadians( 5.0f ), 1.0f, 0.0f, 0.0f ) );

  Earth size is,

  float size = 2000.0f / mTerrainModel.get( )-getBound( ).radius( );

  mTerrainTransform-setDataVariance( osg::Object::STATIC );
  mTerrainTransform-setMatrix( osg::Matrix::scale( size, size, size ) );

  What can I do for protect the aircraft visibility?

  Thanks so much!


  ÜMİT UZUN

  _
  Şimdi aileye katılmanın tam zamanı - Yeni nesil Ücretsiz Windows Live 
 Hizmetlerini şimdi edinin!
  http://get.live.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] osgviewerQT shows garbage when viewer is destroyed and re-created

2008-05-07 Thread Robert Osfield
Hi Mathieu,

I've tried your windows.ive and the suggested mods to osgviewerQT and
it works fine even for running 6 viewers consecutively  using
osgviewerQT windows.ive, but if I add --QOSGWidget I get a crash on
the second run.

FYI, I'm running under Linux.

What command line are you using?

Robert.

On Mon, May 5, 2008 at 5:18 PM, Mathieu Champlon
[EMAIL PROTECTED] wrote:
 Hello,

  I'm facing a problem with the osg Qt integration on several different
 Windows configurations (using NVidia GF 8600 cards, on both XP and Vista),
 with osg 2.2.0 and osg 2.4.0.

  As a (short) example is better than a (long) explanation, here is how to
 reproduce it :
  1. apply the following changes to examples/osgviewerQT/osgviewerQT.cpp
 (basically the goal is to run the application twice) :

  36c36
   int main( int argc, char **argv )
  ---
   int run( int argc, char **argv )
  57a58,63
   }
  
   int main( int argc, char **argv )
   {
   run( argc, argv );
   run( argc, argv );

  2. run examples/osgviewerQT on windows.ive (from the attached windows.zip)
  3. notice the scene showing up : several window frames floating in the air
  4. close the window
  5. notice the trashed 'cubist' scene showing up the second time, indeed
 quite different from the first time

  I can send the texture used in the .ive if needed, can it be a problem with
 the way it has been created ?

  Any suggestion on how to investigate further ?

  Thanks !

  MAT.

 ___
  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 Producer::Rendersurface : transparent pictures

2008-05-07 Thread Robert Osfield
Hi Sebastien,

What size is changing  Window size?  Model size? Viewport size???
The length of a piece of string?

Robert.

On Mon, May 5, 2008 at 5:27 PM, Sébastien Laigre
[EMAIL PROTECTED] wrote:
 Hi !

  In order to do rasterization, I create a Producer::RenderSurface and a
 osg::SceneView. The problem is that its size is changing very often (maybe
 10 times/second). If I let the size constant, images are corrects but as
 soon as the size changes, images are correct on the bottom-left corner and
 the alpha channel is equal to zero else. Sizes of the RenderSurface and
 SceneView are the same. Have you got any idea of where it can com from ? How
 can I fix it ?

  Thank in advance.

  Sebastien

  ___
  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] Load all 6 images from cubemap dds.

2008-05-07 Thread Robert Osfield
Hi Joakim and Roland,

On Mon, May 5, 2008 at 6:46 PM, Smeenk, R.J.M. (Roland)
[EMAIL PROTECTED] wrote:
 Joakim,

  I sent in a submission last year for loading complete cubemaps from DDS
  files. That submission affects important parts of the osg core and
  therefore Robert put it on the stack, which in practice means that it
  won't be merged soon.

This is a good reminder.  Now we have stable release out of the way
its not a bad time to start considering changes that might require
more widespread changes.

Roland could you have have a go at migrating your changes to 2.4/SVN
and then resubmit.

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


Re: [osg-users] Copy constructor for Vec3 or Quat

2008-05-07 Thread Mathias Fröhlich
On Wednesday 07 May 2008 10:43, Serge Lages wrote:
 I was just wondering if it's intended that the Vec3 or Quat classes don't
 have a copy constructor of the form :
 Vec3f( const Vec3f vec3 )

 Can I add them or is there any reason for that .

There is a default one.
You only need to reimplement that if you need something different than the 
default ...

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] Copy constructor for Vec3 or Quat

2008-05-07 Thread Serge Lages
Hi Robert,

I was just wondering if it's intended that the Vec3 or Quat classes don't
have a copy constructor of the form :
Vec3f( const Vec3f vec3 )

Can I add them or is there any reason for that .
Thanks !

-- 
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] Arrays in OpenSceneGraph

2008-05-07 Thread Robert Osfield
Hi Daniel,

osg::Array's all map to OpenGL so have to be contiguous, std::vector
fits the bill, std::list wouldn't.  Regardless of this OpenGL mapping
doing a std::list of tens of thousands of small objects would be
really inefficient memory and computation wise - it's only random
inserts/deletes that you'd gain anything and this isn't a common usage
model for OSG users.

In your case you need to work out what operations you need to do and
how to best map them to manipulation of a std::vector.  Creating a
new Array might even be the most efficient thing to do.

Robert.

On Tue, May 6, 2008 at 10:11 AM, Daniel Moos [EMAIL PROTECTED] wrote:
 Hello

  I have a little question about the osg::Array in OpenSceneGraph. In our
 project we must delete some triangles and normales from an geometry. For
 that we use iterators and the erase() function. Now we have a big
 performance problem.

  To delete 12'000 triangles with its normales, we have 70'000ms.
  If i first copy the hole triangles to a std::list, delete the triangles and
 then copy them back to the osg::DrawElementsUInt structure we only have
 100ms.

  The std::vector work with linear time and the std::list with constant time,
 which is much faster.

  Now my question. Why use the osg::Array a std::vector and not a std::list?
  I'm shure there is a good reason... But I haven't got a clue.

  Thanks  Have a nice day
  Daniel Moos
 ___
  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] Cuda Sample

2008-05-07 Thread Ariel
Thanks 
 
---Original Message---
 
From: Robert Osfield
Date: 5/7/2008 9:19:54 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Cuda Sample
 
Hi Ariel,
 
I don't know of any published OSG/Cuda examples, I'd love to see one though
:-)
 
As how to tackle it I can't help as I haven't read the Cuda docs, I'd
suggest starting with OpenGL/Cuda integration examples and then see
how these might be mapped across to OSG constructs.
 
Robert.
 
On Sun, May 4, 2008 at 10:57 AM, Ariel Hutterer [EMAIL PROTECTED] wrote:
 Hi:
 I try to run cuda from osg.
 I looking for a sample how to do this.
 Specificly i want to Bind the FBO and textures with cuda.
 Some one can help me?
 Or if some body can help me to share arrays between cuda-shaders-osg.
 Thanks
 Ariel
 ___
  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.orgfaint_grain.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TextureCubeMap wrapping ?

2008-05-07 Thread Robert Osfield
Hi Vincent,

osg::TextureCubeMap does work just fine, the osgvertexprogram,
osgprerendercubemap and osgdistortion examples illustrate this.  As to
what is up with your problem I can't say.  The best I can recommend is
go search OpenGL docs on texture cube maps so you understand how they
work then the OSG constructs will make more sense.

Robert.

On Tue, May 6, 2008 at 3:49 PM, Vincent Bourdier
[EMAIL PROTECTED] wrote:
 Hi robert,

 Thanks for this answer, I'll try later and look on other way...

 Just a last question to be sure :

 I just want to put a texture depending on face (and not on geometry) (6 face
 for cube or similar objects for example)... TextureCubeMap doesn't work, so
 have you any idea (with OSG or OpenGl) on how to do something similar ?

 thanks a lot,

 Regards,
Vincent

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


  Hi Vincent,
 
  I'm not sure how other people could help you here - its very much a
  question that doesn't have enough information about the problem to
  know what an appropriate answer might be.
 
  Texture coordinate generation in OpenGL is an awkward topic, and the
  best I can recommend is that you dive into books or online texts that
  discuss it.  The OSG for the most part basically just does a direct
  pass through of settings you make on OSG objects when pass the values
  to OpenGL so OpenGL docs should serve you well.
 
  Robert.
 
 
 
 
  On Tue, Apr 29, 2008 at 9:51 AM, Vincent Bourdier
  [EMAIL PROTECTED] wrote:
   Hi,
  
   With some new tests, I've something different as you can see in the
 attached
   file
  
   I use this code
  
   
osg::TextureCubeMap* texcube = new osg::TextureCubeMap();
   
osg::Image* white = createWhiteImage(_x,_y);
   
texcube-setImage(osg::TextureCubeMap::POSITIVE_X, white);
texcube-setImage(osg::TextureCubeMap::NEGATIVE_X, white);
texcube-setImage(osg::TextureCubeMap::POSITIVE_Y, white);
texcube-setImage(osg::TextureCubeMap::NEGATIVE_Y, white);
   
texcube-setImage(osg::TextureCubeMap::POSITIVE_Z,
 _texGrad.get());
texcube-setImage(osg::TextureCubeMap::NEGATIVE_Z, white);
   
 osg::TexGen *tg = new osg::TexGen;
 tg-setMode(osg::TexGen::OBJECT_LINEAR);
   
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, tg,
   osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
   
   
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, texcube,
   osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);
   
  
   Any idea of how to obtain a good mapping ?
  
   In the picture we can see 6 face or the TextureCubeMap, but how to put
 it a
   the good size ?
Have you already used TextureCubeMap ? or how can you did the mapping
 on a
   face of a geode ?
  
   Thanks a lot,
  
   Regard.
  Vincent.
  
   2008/4/25 Vincent Bourdier [EMAIL PROTECTED]:
  
  
  
Hi all,
   
Attempting to put a texture on a geode, (a texture computed in real
 time)
   I've used osg::TextureCubeMap, which look good to do this with my
 data...
   but I have problems with the correct mapping:
   
In the attached file you can see
1. the texture
2. the node with this texture
   
As you can see, it looks like nothing ...
   
I use this code to obtain this result :
   
   
   
 osg::TextureCubeMap* texcube = new osg::TextureCubeMap();
 texcube-setImage(osg::TextureCubeMap::POSITIVE_X,
 _texGrad.get());
 texcube-setImage(osg::TextureCubeMap::NEGATIVE_X,
 _texGrad.get());
 texcube-setImage(osg::TextureCubeMap::POSITIVE_Y,
 _texGrad.get());
 texcube-setImage(osg::TextureCubeMap::NEGATIVE_Y,
 _texGrad.get());
 texcube-setImage(osg::TextureCubeMap::POSITIVE_Z,
 _texGrad.get());
 texcube-setImage(osg::TextureCubeMap::NEGATIVE_Z,
 _texGrad.get());


 osg::TexMat* texmat = new osg::TexMat;
 texmat-setScaleByTextureRectangleSize(true);
 geode-getOrCreateStateSet()-setTextureAttributeAndModes(0,
 texmat,
   osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);

 geode-getOrCreateStateSet()-setTextureAttributeAndModes(0,
   texcube, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);

   
Wrapping seems to do nothing... TextureRectangle depends of the
 geometry
   vertices ans edges...
   
If you have any idea, I'll be happy to hear you.
   
Thanks.
   
Regards,
   Vincent.
   
  
  
   ___
osg-users mailing list
osg-users@lists.openscenegraph.org
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


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

Re: [osg-users] laser scanner file

2008-05-07 Thread Paul Melis

Robert Osfield wrote:


Hi Fabio,

On Tue, May 6, 2008 at 3:32 PM, fabio riot [EMAIL PROTECTED] wrote:
 


About your advice...(how to render 1200 triangles file,ply)
Once I break the model into smaller geometry (for example N=200
geometry blocks with 6 triangles),
have I to create a scene with one geode for each geometry? or only one
geode containing all N geometry?

I thought the first solution was the best...but trying both I'haven't
noticed difference in frame rate
   



Your biggest bottleneck will be the GPU, which is down to granularity
and the way that you pass your data.  The exact way you hang the
Geometries off the scene graph won't matter too much right now as you
aren't CPU limited, later on once you have the GPU side working
efficient you might see CPU overhead being an issue, then we can look
at optimizing the scene graph structure, but right now don't worry
about it.

W.r.t Granularity try various tests with different number of
triangles in each geometry, look for the sweet spot.

W.r.t how you pass the data, VBO's will most likely be the best way.
Also you need to reduce the amount of memory you using - use
compressed versions of colours, share vertices as much as possible -
use osg::DrawElementUShort.


 


beside with smaller geometry I'have noticed an improvement in
rendering performance using VBO or IM (about 5 fps (N=200) versus 1fps
(N=1)),
but the best solution seem to be DL (fps 15 in all case N=1 or N=220).

For larger dataset (30.000.000 triangles) the program  is able to view
the object, only using IM (switching off DL and VBO)
   



What do you mean by IM?
 


I guess he means immediate mode

Paul


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

 



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


Re: [osg-users] Render To Texture 3D Solved, but another question

2008-05-07 Thread Robert Osfield
Hi Hesicong,

On Tue, May 6, 2008 at 3:59 PM, hesicong2006 [EMAIL PROTECTED] wrote:
  Hi, Robert, I finally found out
  Camera::attach(BufferComponent buffer, osg::Texture* texture, unsigned int
 level, unsigned int face, bool mipMapGeneration)
  function, the fourth parameter face set the Z level of 3D texture. By
 setting difference face( Z order), I can successfully write to 3D texture.

Yes the face both refers to the texture cube map face and the z level
of a 3D texture.  I'll add a doxygen doc into include/osg/Camera to
explain the parameters better.

Are you happy with things now?

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


Re: [osg-users] problem zooming using mouse middle scroll in trackballmanipulator

2008-05-07 Thread Robert Osfield
On Tue, May 6, 2008 at 6:05 PM, Srikanth Bemineni
[EMAIL PROTECTED] wrote:
 Hi,

  Can somebody please reply to the below question.
  Is there a CJM or Postscript output support in Openscenegraph

No, its a scene graph for doing 3D rendering.

If you want hard copy output then you'll need to take a screen image
snapshot then pass this image data to a tool that provides the hard
copy output support.

BTW, when asking a new questions about a different topic please use a
new thread as this makes it much easier for people to follow.

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


Re: [osg-users] Copy constructor for Vec3 or Quat

2008-05-07 Thread Mathias Fröhlich
On Wednesday 07 May 2008 11:12, Serge Lages wrote:
 Off course you're right. Let's explain a bit my problem :
 I would like to use the any class from the Boost library (
 http://www.boost.org/doc/libs/1_35_0/doc/html/any.html), but it doesn't
 work with Vec3 or Quat types (but it works with Matrix for example).

 I have this compile error :
 error LNK2019: unresolved external symbol public: __thiscall
 osg::Vec3d::Vec3d(class osg::Vec3d const )

 That's why I was thinking that it has something to do with the fact that
 Matrix implement its copy constructor and not the Vec3 or Quat classes.
 I've made some tests and actually it only works with classes implementing
 explicitly their copy constructors.

 So should it be possible to add copy constructors to these classes ? :)

Ok, not sure, but I expect this a bug in the c++ compiler.

Anyway, may be Robert will accept a workaround patch for that ...

Greetings and good luck on windows :)

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] problem zooming using mouse middle scroll in trackballmanipulator

2008-05-07 Thread Robert Osfield
Hi Srikanth,

The osgGA camera manipulators don't currently check the scroll wheel
at all.  They are all open source so if you need this feature just
dive into the implementation and add them and then send me the changes
so we can get it merged with SVN.

Robert.

On Mon, May 5, 2008 at 11:46 PM, Srikanth Bemineni
[EMAIL PROTECTED] wrote:
 I am experimenting with the osgQTviewer.I am not able to zoom in when the
 mouse wheel is scrolled.I am using trackballmanipulator.I am not able to
 find a good documentation about camera manipulators.Even the Reference doc
 doesn't mention the explanation of manipulators.

  AdapterWidget::AdapterWidget( ViewerQT *source ,QWidget * parent, const
 char * name, const QGLWidget * shareWidget, WindowFlags f):
  #if USE_QT4
QGLWidget(parent, shareWidget, f)
  #else
QGLWidget(parent, name, shareWidget, f)
  #endif
  {
m_source = source;
resize( 800 ,600 );
/* To Remove this */
/*
 * // create the window to draw to.
 * */
osg::ref_ptrosg::GraphicsContext::Traits traits = new
 osg::GraphicsContext::Traits;
traits-x = 200;
traits-y = 200;
traits-width = 800;
traits-height = 600;
traits-windowDecoration = true;
traits-doubleBuffer = true;
traits-sharedContext = 0;

osg::ref_ptrosg::GraphicsContext gc =
 osg::GraphicsContext::createGraphicsContext(traits.get());

_gw = new osgViewer::GraphicsWindowEmbedded(traits.get());
  #if USE_QT4
setFocusPolicy(Qt::ClickFocus);
  #else
setFocusPolicy(QWidget::ClickFocus);
  #endif
  }
  ..
  ... all the other event handling
  ...



  void AdapterWidget::mouseMoveEvent( QMouseEvent* event )
  {
_gw-getEventQueue()-mouseMotion(event-x(), event-y());
  }

  void AdapterWidget::wheelEvent( QWheelEvent *event )
  {
//m_source-wheelEvent( event );
  if( event-delta()  0 )
  _gw-getEventQueue()-mouseScroll(osgGA::GUIEventAdapter::SCROLL_UP );
else
  _gw-getEventQueue()-mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN
 );
 }

  ViewerQT::
  ViewerQT(QWidget * parent, const char * name, const QGLWidget * shareWidget
 , WindowFlags f ):
AdapterWidget( this , parent, name, shareWidget, f )
{

znear = 1.0f;
zfar = 1.0f;
getCamera()-setViewport(new osg::Viewport(0,0,width(),height()));
  //getCamera()-setProjectionMatrixAsPerspective(30.0f,
 static_castdouble(width())/static_castdouble(height()), 1.0f, 1.0f);


getCamera()-setGraphicsContext(getGraphicsWindow());
/* To Remove*/
osg::ref_ptrosgGA::StateSetManipulator statesetManipulator = new
 osgGA::StateSetManipulator(getCamera()-getStateSet());
addEventHandler(statesetManipulator.get());
/*to remove end*/

addEventHandler(new PickHandler());

setThreadingModel(osgViewer::Viewer::SingleThreaded);

connect(_timer, SIGNAL(timeout()), this, SLOT(updateGL()));
_timer.start(10);
  _manipulator = new osgGA::TrackballManipulator;
setCameraManipulator(_manipulator);
coutMinimum distance _manipulator-getMinimumDistance()endl;
coutHomepostion
 compute_manipulator-getAutoComputeHomePosition()endl;
//_manipulator-setAutoComputeHomePosition(false);
_manipulator-setMinimumDistance(1000);
osg::Vec3d eye;
osg::Vec3d center;
osg::Vec3d up;
_manipulator-getHomePosition( eye , center , up );
coutx y z  eye.x()eye.y()eye.z()endl;
coutx y z  center.x()center.y()center.z()endl;
coutx y z  up.x()up.y()up.z()endl;
   }
   void
  ViewerQT::
  VwheelEvent( QWheelEvent *event )
  {

coutevent-delta()endl;
if( event-delta()  0 )
{
znear = znear + 120.0f;
}
else
{
if( (znear - 120) = 1.0 )
{
znear = znear - 120;
}
}

  }

  void
  ViewerQT::
  paintGL()
  {
osg::Vec3d eye;
osg::Vec3d center;
osg::Vec3d up;
_manipulator-getHomePosition( eye , center , up );
couteye x y z  eye.x() eye.y() eye.z()endl;
coutcenter x y z center.x() center.y()
 center.z()endl;
coutup x y z  up.x() up.y() up.z()endl;
frame();
  }


  and this is how I am creating the Viewer window.
  I tried to move the perspective view.
  I tried to translate the camera matrix.
  I tried to set the home positon
  but none of the above things seems to work in moving the camera or
 zooming.I am new to opengl and open scene graph any guide would be really
 helpful.

  Thank You

  --
  With Regards
  Srikanth Bemineni
  Geotrace Technologies
  281-497-8440 extn 228

  ___
  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] Robert, collada dae2 maybe?

2008-05-07 Thread Robert Osfield
On Tue, May 6, 2008 at 6:38 PM,  [EMAIL PROTECTED] wrote:
  Was waiting to see if Steve had any anomalies show up on his end.

  Sorry, I know I said I'd look at this over the weekend but I didn't get a
 chance. I'll definitely test this sometime this week.

  Robert, I would move forward with merging Garrett's patch into the OSG
 trunk. If I have changes to contribute it'll be easier if we're both working
 off the trunk rather than emailing patches back and forth.

I'm just trying to get through my inbox right now, once this is done
I'll review submissions and most hopefully will be able to get most of
them merged today.

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


[osg-users] osg::Fog (was: Aircraft Getting Invisible ?)

2008-05-07 Thread Zoltán
Robert Osfield wrote on Wednesday 07 May 2008:

 2008/5/5 ümit uzun [EMAIL PROTECTED]:
   I have an aircraft. I resize it and add scene on the
  earth but it get invisible when I resized much smaller
  like that,

 you'll need to make sure you use 
 glFog/osg::Fog on the terrain to make sure that you can
 only see up to a set maximum distanace.

Hi Ümit,

if you manage to get this osg::Fog working for you, would 
you post your solution ? Because it's something I'd need 
too for zSim.

Robert,

there is no example about osg::Fog, only help are the 
include files ... tough. Can you point to some simple 
implementation, for a small (some meters) model in a BIG 
scenery (several km), and with a fog starting at say 10km, 
fully opaque at 20km ?

Thanks  bye-bye

Zoltán




-- 
 


Zoltan

http://sourceforge.net/projects/zsim


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


Re: [osg-users] SDL osgViewer

2008-05-07 Thread Robert Osfield
Hi Zoltan,

I have used SDL for joytstick support in OSG for a number of years -
one can simply
set SDL to poll for the events and let the osgViewer create all
windows.  Present3D is
an example of this in action.

In your own app you could probably just do all mouse, keyboard and
joystick handling in
your own code, polling for events on each new frame.  If you want to
reuse the osgGA
event handlers/camera manipulators then you'll need to adapt the
events into osgGA
ones, the osgviewerSDL example will show you how to do this.  If you
don't need the
off the shelf event support you just just have you own event handling
and set the master
camera's view matrix on each new frame as required.

Robert.

On Tue, May 6, 2008 at 11:34 AM, Zoltán [EMAIL PROTECTED] wrote:
 Hello,

  I have an OSG application that uses joysticks, and I use SDL
  for those. But I also need a mouse and keyboard and use
  (today) OSG for that. Sometimes it's a bit messy to do
  this, because when there is no joystick connected I fall
  back to the mouse, and the interface is very different (one
  is a SDL_JOYSTICk and the other an osgEventHandler). I'd
  like to handle mouse and joystick from the same interface,
  so either make both of them through SDL or both of them an
  osgEventHandler.

  Wouldn't it be more coherent to use SDL for all input ?
  But then, I need to create the window with SDL, and embed
  the osgViewer inside this window. Is this a reliable way to
  do things ? Because if I create the window with OSG, SDL
  doesn't see the mouse and keyboard.

  Or, is there a way to make an osgEventHandler from a
  SDL_JOYSTICK interface ? There is an osgviewerSDL in the
  examples (v2.3.4) but this is for an embedded OSG viewer
  inside an SDL window... would those work with a joystick ?

  Any suggestions ?

  cheers

  Zoltán



  PS: the application in question is a flight simulator:
  http://sourceforge.net/projects/zsim

  --

  

  Zoltan
  


  ___
  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] Color Transformations

2008-05-07 Thread Robert Osfield
Hi Weng,

glColorMask/osg::Camera::setColorMask is not the appropriate tool to
use to make a grayscale image, it just enable/disables the writing to
the different colour changes.  For greyscale you'll need to use a
ColorMatrix, however, this uses part of the OpenGL pipeline that isn't
generally implemented in all modes/hardware/drivers,  you'll need to
read up on OpenGL specs to learn these caveates.

The other way to do is would be to write a shader that applies a
convert to greyscale in the fragment program, or to do a multipass
approach where you render to FBO, then have a second pass that does
the conversion.

Robert.


On Tue, May 6, 2008 at 8:17 PM, Weng Heng Sze Tho
[EMAIL PROTECTED] wrote:
 I would like to know how to implement color transformations (e.g. change to
 grayscale view).

 I tried using osg::Camera::setColorMask(true, true, true, true) function but
 that doesn't seem to work.
 So I'm wondering if I am using the function correctlyor is this the
 correct function to call?

 Thanks in advance



  

  Real people. Real questions. Real answers. Share what you know.
 ___
  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] CTDB and OSG

2008-05-07 Thread Robert Osfield
Hi Sergey,

I know of no plugins closed or open source to load CTDB files.  If you
have to load from this format then you most likely will need to roll
your sleeves up and implement it.

Robert.

On Tue, May 6, 2008 at 8:57 PM, Leontyev, Sergey [EMAIL PROTECTED] wrote:
 Can OSG load CTDB (Compact Terrain Database). Does anyone have a plugin?

  Thanks!
  Sergey
  ___
  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] UFO manipulator

2008-05-07 Thread Robert Osfield
Hi Bob,

osgviewer in 2.x simply doesn't register the UFOManipulator (press 'h'
to get an onscreen listing on manipulators that are registered by
default).   For your own viewers you can add UFOManipilator - just
have a look at the code in osgviewer to see how its done.

Robert.

On Wed, May 7, 2008 at 1:51 AM, Bob Huebert [EMAIL PROTECTED] wrote:
 Can anyone say what's up with the UFO manipulator?

  While in osgviewer I should be able to press '5' to select UFO mode. This
 doesn't have any effect. Other manipulation modes are fine.

  tia
  -bob
  ___
  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] update example

2008-05-07 Thread erf
It would be usefull i think if anyone would post some examples / doc on how to 
update textures images and geometry using osg in real time, since I (and 
probably others) have had problems with this. I can't still figure this out and 
therefore had to stop using osg for now.

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


Re: [osg-users] filling colors into drawn Objects

2008-05-07 Thread Robert Osfield
HI Srikanth,

Please split your separate questions into separate posts.

Robert.

On Wed, May 7, 2008 at 2:22 AM, Srikanth Bemineni
[EMAIL PROTECTED] wrote:

  Hi

  How do we fill color in a drawn object.Here I am trying to draw a circle
 and also I want to fill it with yellow  color.

  1.What do you mean by actually setting this array ?
  setTexCoordArray(0, texcoords);


  2.What are these values or co-ordinates ?
  (*texcoords)[j].set( 40.50f, 40.0f );

  Even the tutorial doesn't have proper explanation for this

  3.Can we support CGM(Computer Graphic Metadatafile) or Postscript importing
 of the screen ?

  4.I am trying to antalias or draw smooth  lines but the opengl is not
 drawing the lines smoothly even if I have set Stateset ?
 osg::StateSet* StateSet = new osg::StateSet();
 osg::ref_ptrosg::Hint antialias = new osg::Hint(GL_LINE_SMOOTH_HINT,
 GL_NICEST);
 StateSet-setAttributeAndModes(antialias.get(),
 osg::StateAttribute::ON);
 what Am I doing wrong here ?



  Srikanth Bemieni



 /*/
  //degree to radian conversion
  const float DEG2RAD = 3.14159/180;
  osg::Geode* circle = new osg::Geode;

  osg::Geometry* circleGeom = new osg::Geometry; //circle geometery
  circle-addDrawable( circleGeom );
  osg::Vec3Array* circleArray = new osg::Vec3Array;

  //To calculate circle points
  //here it is every 30 degrees 12 point circle or polygon what ever
  int radius  = 1000;
  for (int i=0; i  360; i = i + 30 )
  {
  float degInRad = i*DEG2RAD;
  circleArray-push_back(
 osg::Vec3(cos(degInRad)*radius,0,sin(degInRad)*radius ) );
  }

  circleGeom-setVertexArray( circleArray );

  //attaching the points
  osg::DrawElementsUInt* circleelementobj = new  osg::DrawElementsUInt(
 osg::PrimitiveSet::LINE_LOOP, 0 );

  osg::Vec4Array*  ccolors = new osg::Vec4Array;
  osg::TemplateIndexArray unsigned int, osg::Array::UIntArrayType,4,4
 *colorIndexArray;
  colorIndexArray =new osg::TemplateIndexArrayunsigned int,
 osg::Array::UIntArrayType,4,4;

  osg::Vec2Array* texcoords = new osg::Vec2Array(360/30);

  for( int j=0 ; j  360/30 ; j++ )
  {
  circleelementobj-push_back( j );
  ccolors-push_back(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ); //index 0
 redi
  (*texcoords)[j].set( 40.50f, 40.0f ); //I really didn't get what to
 do just copied from the tutorial
  }

  circleelementobj-push_back( 0 );

  for( int k = 0 ; k  360 /30 ; k++ )
  {
  colorIndexArray-push_back(0);
  }


  ccolors-push_back(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ); //index 0 red

  circleGeom-addPrimitiveSet( circleelementobj );

  circleGeom-setColorArray(ccolors);
  circleGeom-setColorIndices(colorIndexArray);
  circleGeom-setColorBinding(osg::Geometry::BIND_PER_VERTEX);
  circleGeom-setTexCoordArray(0, texcoords);

   osg::PositionAttitudeTransform* circleXForm =
  new osg::PositionAttitudeTransform();


   circleXForm-setPosition(osg::Vec3( 4000 ,0, 4100 ));
   root-addChild(circleXForm);
   circleXForm-addChild( circle );


 /*/

  --
 With Regards
 Srikanth Bemineni
 Geotrace Technologies
 281-497-8440 extn 228






 ___
  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::Fog (was: Aircraft Getting Invisible ?)

2008-05-07 Thread Robert Osfield
On Wed, May 7, 2008 at 10:27 AM, Zoltán [EMAIL PROTECTED] wrote:
  there is no example about osg::Fog, only help are the
  include files ... tough. Can you point to some simple
  implementation, for a small (some meters) model in a BIG
  scenery (several km), and with a fog starting at say 10km,
  fully opaque at 20km ?

osg::Fog just wraps up glFog, so for docs have a look at OpenGL docs on glFog.

The osgParticule::PrecipitationEffect also uses osg::Fog so have a
look at this implementtion.

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


Re: [osg-users] update example

2008-05-07 Thread Alberto Luaces
El Miércoles 07 Mayo 2008ES 11:53:38 [EMAIL PROTECTED] escribió:
 It would be usefull i think if anyone would post some examples / doc on how
 to update textures images and geometry using osg in real time, since I (and
 probably others) have had problems with this. I can't still figure this out
 and therefore had to stop using osg for now.

 Erlend

Texture images: osgmovie
Geometry: osgCal (http://osgcal.sourceforge.net/)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MultiThreads in OSG

2008-05-07 Thread David Callu
Hi Renan

2008/5/6 Renan Mendes [EMAIL PROTECTED]:

 Hi, everyone.

I've tried creating another thread in my application using the
 windows API (CreateThread, etc), but it seems that this thread has become a
 main thread,

 here it's probably misuse of  multithreading.


 i.e, my program is not working as a multithreaded application. In my case,
 this means that I'm not even displaying the OSG default screen - all I have
 is the prompt display, printing some information I wanted. Does OSG have
 support for multithreading?

yes it is, but only to render the scene. When you have multi camera or multi
graphics context, you can render them in multithreaded operations.

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


Re: [osg-users] update example

2008-05-07 Thread Robert Osfield
Hi Erland,

The osgprerender example has a waving flag that is animated via an
update callback.

Robert.

On Wed, May 7, 2008 at 10:53 AM,  [EMAIL PROTECTED] wrote:




 It would be usefull i think if anyone would post some examples / doc on how
 to update textures images and geometry using osg in real time, since I (and
 probably others) have had problems with this. I can't still figure this out
 and therefore had to stop using osg for now.



 Erlend
 ___
  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] Data of fresh textures - Bug/Features

2008-05-07 Thread Robert Osfield
Hi Art,

If you want a specific image in osg::Texture then just attach an
osg::Image containing
black pixels.

W.r.t call glTexImage?D with a null pointer, this just allocates the
memory, as far as I'm
aware there is no formal rules about initialization of it, and as such
its undefined so getting
random data is prefectly valid.  The intention of this null pointer
support in glTexImage is
purely for allocation, its intended that it'd be followed up with
glTexSubImage calls to set it,
if you don't have this in your own code and are getting random results
it down to a bug
in your code.

Robert.

On Wed, May 7, 2008 at 12:17 AM, Art Tevs [EMAIL PROTECTED] wrote:
 Hi folks,

  I think I've found an improvement or a possible bug
  for the textures in osg. If one do allocate empty
  textures (not from images) then the texture is created
  with glTexImageXD call and with 0 as pixel pointer.

  As per OpenGL 1.1 specification the texture is
  allocated but the data in the texture is not defined.
  On some machines this is not an issue, since the
  freshly allocated texture do contain just 0 for every
  pixel. However on some setups the texture do contain
  random data.

  For my case I do need to assume that the fresh
  allocated textures do contain 0 as values. Hence I
  need something like cleanup function, which do bring
  the texture in a defined state after it was allocated.
  Therefor I would like to write a patch for the texture
  classes which do fill the texture with some defined
  value (default 0) during the allocation if user whish
  this.

  Any comments, ideas or suggestions?


  Best regards,
  Art







   E-Mails jetzt auf Ihrem Handy.
  www.yahoo.de/go
  ___
  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] MultiThreads in OSG

2008-05-07 Thread Robert Osfield
Hi Renan,

Multi-threading is big topic, and yes the OSG does support
multi-threading out of the box, but it there are constraints in how
you need to manage the threading.   Search through the archives on
this topic to get a flavour.

Personally I'd recommend using OpenThreads over native Windowing, as
not only is it more portable, it'll integrate better with OSG apps.  I
also have to recommend taking small steps at learning about threading.
 Threading is one of the most awkward topics in computing, there are
lots of issues that you don't see in single threading apps.

Robert.

On Tue, May 6, 2008 at 8:41 PM, Renan Mendes [EMAIL PROTECTED] wrote:
 Hi, everyone.

I've tried creating another thread in my application using the
 windows API (CreateThread, etc), but it seems that this thread has become a
 main thread, i.e, my program is not working as a multithreaded
 application. In my case, this means that I'm not even displaying the OSG
 default screen - all I have is the prompt display, printing some information
 I wanted. Does OSG have support for multithreading? Or my problem is
 probably misuse of  multithreading?

 Thanks,

 Renan M Z Mendes

 ___
  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] Performance decrease with 2.4.0

2008-05-07 Thread Robert Osfield
Hi Chris,

There isn't any major changes to rendering in 2.4.0, so you should get
pretty well the same performance profile from 2.4.0.

Perhaps it's an issue as simply as build options - are you compiling
under Release build under 2.4?

Robert.

On Tue, May 6, 2008 at 8:59 PM, DC Fennell [EMAIL PROTECTED] wrote:


 Hi everybody,

 Our application is loading IVEs and DDS textures. With OSG 2.4.0, the load
 times seem to have been increased significantly and the framerate in our
 scenes has decreased around 10%. It's quite difficult to figure out what
 exactly has caused this based on the changes from 2.2.0 to 2.4.0.

 Does anyone have any possible explanations for this behavior?

 Thanks
 Chris

 ___
  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] Copy constructor for Vec3 or Quat

2008-05-07 Thread Serge Lages
Off course you're right. Let's explain a bit my problem :
I would like to use the any class from the Boost library (
http://www.boost.org/doc/libs/1_35_0/doc/html/any.html), but it doesn't work
with Vec3 or Quat types (but it works with Matrix for example).

I have this compile error :
error LNK2019: unresolved external symbol public: __thiscall
osg::Vec3d::Vec3d(class osg::Vec3d const )

That's why I was thinking that it has something to do with the fact that
Matrix implement its copy constructor and not the Vec3 or Quat classes. I've
made some tests and actually it only works with classes implementing
explicitly their copy constructors.

So should it be possible to add copy constructors to these classes ? :)

Cordially,

On Wed, May 7, 2008 at 10:52 AM, Mathias Fröhlich 
[EMAIL PROTECTED] wrote:

 On Wednesday 07 May 2008 10:43, Serge Lages wrote:
  I was just wondering if it's intended that the Vec3 or Quat classes
 don't
  have a copy constructor of the form :
  Vec3f( const Vec3f vec3 )
 
  Can I add them or is there any reason for that .

 There is a default one.
 You only need to reimplement that if you need something different than the
 default ...

 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




-- 
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] laser scanner file

2008-05-07 Thread Robert Osfield
Hi Fabio,

On Tue, May 6, 2008 at 3:32 PM, fabio riot [EMAIL PROTECTED] wrote:
  About your advice...(how to render 1200 triangles file,ply)
  Once I break the model into smaller geometry (for example N=200
  geometry blocks with 6 triangles),
  have I to create a scene with one geode for each geometry? or only one
  geode containing all N geometry?

  I thought the first solution was the best...but trying both I'haven't
  noticed difference in frame rate

Your biggest bottleneck will be the GPU, which is down to granularity
and the way that you pass your data.  The exact way you hang the
Geometries off the scene graph won't matter too much right now as you
aren't CPU limited, later on once you have the GPU side working
efficient you might see CPU overhead being an issue, then we can look
at optimizing the scene graph structure, but right now don't worry
about it.

 W.r.t Granularity try various tests with different number of
triangles in each geometry, look for the sweet spot.

W.r.t how you pass the data, VBO's will most likely be the best way.
Also you need to reduce the amount of memory you using - use
compressed versions of colours, share vertices as much as possible -
use osg::DrawElementUShort.


  beside with smaller geometry I'have noticed an improvement in
  rendering performance using VBO or IM (about 5 fps (N=200) versus 1fps
  (N=1)),
  but the best solution seem to be DL (fps 15 in all case N=1 or N=220).

  For larger dataset (30.000.000 triangles) the program  is able to view
  the object, only using IM (switching off DL and VBO)

What do you mean by IM?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Back online but hundreds of posts to go...

2008-05-07 Thread Robert Osfield
Hi Paul,

I must admit not having given the FAQ much attention in the last year.
 It would be good to start updating it/reorganising it.   I'm fully
open to suggestions on how to improve it and assistance with improving
it.  I'd suggest kicking out a separate thread for this.

Robert.

  It seems that a percentage of the posts on the lists can be considered
 straight items from the FAQ on the website. I recently did a bit of editing
 on the FAQ as it isn't really the most readable piece on the site.
 Particularly, I updated some stuff that seemed to reference OSG versions
 when Producer was still used, deleted/replaced broken URLs and fixed some
 wording and spelling. However, I stil think it can be improved and hopefully
 make more people consult it before posting to the list. Things I had in
 mind:
  - Structure the items in a few sections (e.g. Introduction/Overview,
 Building/Installation, File formats, General development, Linux-specific,
 Windows-specific, etc)
  - Update the list of file formats to include information on read/write
 support of all plugins
  - osgViewer seems to be responsible for a fair amount of posts, perhaps it
 deserves its own section in the FAQ?

  Now, I don't have enough knowledge of every piece of OSG to edit all the
 entries, but I'd be happy to continue improving the FAQ. I didn't see an
 easy way for structuring, as currently an automatically generated overview
 of the questions is used. Any tips there?

  Paul

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

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


Re: [osg-users] Performing non-rendering actions between renderbins

2008-05-07 Thread Robert Osfield
Hi Jason,

What do types of operations are you looking to do?

Robert.

On Mon, Apr 28, 2008 at 9:58 PM, Jason Baurick [EMAIL PROTECTED] wrote:
 Hi,

 I recently started working with OSG and I have what is hopefully a simple
 question.  I have a composite viewer with two views, I want to perform an
 action on the buffers in each view between the opaque rendering and the
 transparent rendering, each view needs to perform a different action.
 Currently to make this work I added two nodes to my scene graph, culled out
 one for each view and then stuck them in a renderbin between the opaque and
 transparent bins.  So I guess what I'm asking is if there is a simpler way
 to do this?  I tried setting up camera callbacks, but this happens at the
 wrong point, my next thought would be to overload the draw traversal.

 Any suggestions would be welcomed, thank you in advance.

 --
 --Jason Baurick

 ___
  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] Changing texture coordinates of built-in shape drawables

2008-05-07 Thread Franclin Foping
Hi,
 I would like to achieve a multitexture effect on built-in shape drawable 
objects (Box, Capsules and so forth).
 My question is how to get and/or change the texture coordinates of these 
objects?
 Waiting for your reply.
 Franclin.

 __
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Data of fresh textures - Bug/Features

2008-05-07 Thread Art Tevs
Hi Robert,

 
 If you want a specific image in osg::Texture then
 just attach an
 osg::Image containing
 black pixels.
 
Of course I could do this, however I do not want to
for several reasons:
 - long upload time
 - the image is not needed at all, I am interested
only in an empty texture
 - using more system memory to holding the image data


 W.r.t call glTexImage?D with a null pointer, this
 just allocates the
 memory, as far as I'm
 aware there is no formal rules about initialization
 of it, and as such
 its undefined so getting
 random data is prefectly valid.  
Yes, it is. It is in deed valid.

 The intention of
 this null pointer
 support in glTexImage is
 purely for allocation, its intended that it'd be
 followed up with
 glTexSubImage calls to set it,
 if you don't have this in your own code and are
 getting random results
 it down to a bug
 in your code.
 
Even if I would have this in my code, uploading data
to the texture is not so straight forward with osg,
because of all that context and state things (I have
to proivde a state for applyTexImage2D_subload, but
where do I get it from during the creating of that
texture)

I completly understand, that getting random values is
a valid behaviour in respect to specifications.
However I also want to have something like a clear
method on a texture, to allow filling the texture with
some predefined value during the apply. Of course this
would stay completely orthogonal to existing texture
behaviour.


My idea was to do following as soon as user request
clear on the next apply:
 - if user hardware supports FBOs then create a
temporary fbo, setup clear color with glClearColor and
call glClear. This will write predefined value into
that texture pretty efficient (of course don't forget
to bring the gl pipeline in the previous state back)

 - if hardware do not support fbo, then do this in the
image way, hence create temporary an array holding the
default color value and upload it to the texture. This
would be slower however will also work.


Cheers,
Art


 Robert.
 
 On Wed, May 7, 2008 at 12:17 AM, Art Tevs
 [EMAIL PROTECTED] wrote:
  Hi folks,
 
   I think I've found an improvement or a possible
 bug
   for the textures in osg. If one do allocate empty
   textures (not from images) then the texture is
 created
   with glTexImageXD call and with 0 as pixel
 pointer.
 
   As per OpenGL 1.1 specification the texture is
   allocated but the data in the texture is not
 defined.
   On some machines this is not an issue, since the
   freshly allocated texture do contain just 0 for
 every
   pixel. However on some setups the texture do
 contain
   random data.
 
   For my case I do need to assume that the fresh
   allocated textures do contain 0 as values. Hence
 I
   need something like cleanup function, which do
 bring
   the texture in a defined state after it was
 allocated.
   Therefor I would like to write a patch for the
 texture
   classes which do fill the texture with some
 defined
   value (default 0) during the allocation if user
 whish
   this.
 
   Any comments, ideas or suggestions?
 
 
   Best regards,
   Art
 
 
 
 
 
 
 
E-Mails jetzt auf Ihrem Handy.
   www.yahoo.de/go
   ___
   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
 



  E-Mails jetzt auf Ihrem Handy.
www.yahoo.de/go
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Load all 6 images from cubemap dds.

2008-05-07 Thread Smeenk, R.J.M. (Roland)

OK, will take a look at it this evening.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Robert Osfield
 Sent: woensdag 7 mei 2008 10:51
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Load all 6 images from cubemap dds.
 
 Hi Joakim and Roland,
 
 On Mon, May 5, 2008 at 6:46 PM, Smeenk, R.J.M. (Roland) 
 [EMAIL PROTECTED] wrote:
  Joakim,
 
   I sent in a submission last year for loading complete 
 cubemaps from 
  DDS  files. That submission affects important parts of the osg core 
  and  therefore Robert put it on the stack, which in practice means 
  that it  won't be merged soon.
 
 This is a good reminder.  Now we have stable release out of 
 the way its not a bad time to start considering changes that 
 might require more widespread changes.
 
 Roland could you have have a go at migrating your changes to 
 2.4/SVN and then resubmit.
 
 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
 
This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html

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


[osg-users] RE : Re: osg::Fog (was: Aircraft Getting Invisible ?)

2008-05-07 Thread Franclin Foping
Hi,
 As Robert mentions osg::Fog  is just a wrapper for OpenGL glFog  command. I am 
currently writing  a set of  OSG tutorials included with some codes for 
beginners. I have covered the osg::Fog class in my tutorials.
 Right now, I have written all the source codes. I just need to finish the 
writing up and find out how to publish it on the official website and this will 
be a huge boon to every OSG newcomer.
 Hope that will help.
 Regards,
 Franclin.

Robert Osfield [EMAIL PROTECTED] a écrit : On Wed, May 7, 2008 at 10:27 AM, 
Zoltán  wrote:
  there is no example about osg::Fog, only help are the
  include files ... tough. Can you point to some simple
  implementation, for a small (some meters) model in a BIG
  scenery (several km), and with a fog starting at say 10km,
  fully opaque at 20km ?

osg::Fog just wraps up glFog, so for docs have a look at OpenGL docs on glFog.

The osgParticule::PrecipitationEffect also uses osg::Fog so have a
look at this implementtion.

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


 __
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG tutorials available

2008-05-07 Thread Smeenk, R.J.M. (Roland)
Franclin,
 
Do you mean the tutorials in the Wiki? Please feel free to update/attach the 
sources in the Wiki to work with OSG 2.4.
 
--
Roland




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Franclin 
Foping
Sent: woensdag 7 mei 2008 12:17
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] OSG tutorials available


Hi,
 I am currently compiling some OSG tutorials for newbies. I think to be 
through next week.
 However, I would like to know how I can publish them on the official 
website so that every user can use them?
 Waiting for your answer.
 Regards,
 Franclin.


__
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection 
possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG tutorials available

2008-05-07 Thread Franclin Foping
Hi,
 I am currently compiling some OSG tutorials for newbies. I think to be through 
next week.
 However, I would like to know how I can publish them on the official website 
so that every user can use them?
 Waiting for your answer.
 Regards,
 Franclin.

 __
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewerQT shows garbage when viewer is destroyed and re-created

2008-05-07 Thread Mathieu Champlon

Hello,

Thanks for your reply !

I am indeed running osgviewerQT windows.ive.
If I add --QOSGWidget I get this error message right away : Windows 
Error #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable to 
create OpenGL rendering context. Reason: The pixel format is invalid.
Followed by a crash (_gw is 0 in QOSGWidget::resizeEvent due to the 
failure to initialize properly).


I'm using Qt 4 by the way, I forgot to mention it.
And also I have loads of .ive working fine, this one is among the 3 or 4 
which exhibit the issue. It looks like the common trait might have to do 
with transparency.


I also tried the same test procedure with examples/osgwindows and it 
works fine.
Moreover I just tested on a Windows XP with an (old FireGL V3100) ATI 
graphics card and everything works perfectly.


Do you have any suggestion ?
Should I just wait and hope for the next NVidia drivers ? :)

Thanks !
MAT.


Robert Osfield wrote:

Hi Mathieu,

I've tried your windows.ive and the suggested mods to osgviewerQT and
it works fine even for running 6 viewers consecutively  using
osgviewerQT windows.ive, but if I add --QOSGWidget I get a crash on
the second run.

FYI, I'm running under Linux.

What command line are you using?

Robert.
  



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


Re: [osg-users] Changing texture coordinates of built-in shape drawables

2008-05-07 Thread Robert Osfield
Hi Franclin,

You can't modify the texture coordinates of ShapeDrawable, as explain
yesterday, ShapeDrawable is just a simple class for enabling rendering
shape primitives, its not meant as a general purpose rendering tool.
Please build geometries using osg::Geometry as per the osggeometry
example for general purpose rendering.

Robert.



On Wed, May 7, 2008 at 11:00 AM, Franclin Foping [EMAIL PROTECTED] wrote:
 Hi,
  I would like to achieve a multitexture effect on built-in shape drawable
 objects (Box, Capsules and so forth).
  My question is how to get and/or change the texture coordinates of these
 objects?
  Waiting for your reply.
  Franclin.


  __
 Do You Yahoo!?
 En finir avec le spam? Yahoo! Mail vous offre la meilleure protection
 possible contre les messages non sollicités
 http://mail.yahoo.fr Yahoo! Mail
 ___
  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] Data of fresh textures - Bug/Features

2008-05-07 Thread Robert Osfield
Hi Art,

I don't think the OSG has itself issues here, rather its what you are
doing at you end is introducing problems that don't exist otherwise.
For instance normally users will use FBO as an attachment to an
osg::Camera, and the OSG rendering backend with do the glClear as
specified by the osg::Camera settings.

If you have custom code that uses FBO's and needs to do a glCear then
you'll need to add this call yourself such as via subclassing of
osg::FrameBufferObject, or by create a RenderStage for the FBO as part
of the rendering backend.

Robert.

On Wed, May 7, 2008 at 11:04 AM, Art Tevs [EMAIL PROTECTED] wrote:
 Hi Robert,


  
   If you want a specific image in osg::Texture then
   just attach an
   osg::Image containing
   black pixels.
  
  Of course I could do this, however I do not want to
  for several reasons:
   - long upload time
   - the image is not needed at all, I am interested
  only in an empty texture
   - using more system memory to holding the image data



   W.r.t call glTexImage?D with a null pointer, this
   just allocates the
   memory, as far as I'm
   aware there is no formal rules about initialization
   of it, and as such
   its undefined so getting
   random data is prefectly valid.
  Yes, it is. It is in deed valid.


   The intention of
   this null pointer
   support in glTexImage is
   purely for allocation, its intended that it'd be
   followed up with
   glTexSubImage calls to set it,
   if you don't have this in your own code and are
   getting random results
   it down to a bug
   in your code.
  
  Even if I would have this in my code, uploading data
  to the texture is not so straight forward with osg,
  because of all that context and state things (I have
  to proivde a state for applyTexImage2D_subload, but
  where do I get it from during the creating of that
  texture)

  I completly understand, that getting random values is
  a valid behaviour in respect to specifications.
  However I also want to have something like a clear
  method on a texture, to allow filling the texture with
  some predefined value during the apply. Of course this
  would stay completely orthogonal to existing texture
  behaviour.


  My idea was to do following as soon as user request
  clear on the next apply:
   - if user hardware supports FBOs then create a
  temporary fbo, setup clear color with glClearColor and
  call glClear. This will write predefined value into
  that texture pretty efficient (of course don't forget
  to bring the gl pipeline in the previous state back)

   - if hardware do not support fbo, then do this in the
  image way, hence create temporary an array holding the
  default color value and upload it to the texture. This
  would be slower however will also work.


  Cheers,
  Art




   Robert.
  
   On Wed, May 7, 2008 at 12:17 AM, Art Tevs
   [EMAIL PROTECTED] wrote:
Hi folks,
   
 I think I've found an improvement or a possible
   bug
 for the textures in osg. If one do allocate empty
 textures (not from images) then the texture is
   created
 with glTexImageXD call and with 0 as pixel
   pointer.
   
 As per OpenGL 1.1 specification the texture is
 allocated but the data in the texture is not
   defined.
 On some machines this is not an issue, since the
 freshly allocated texture do contain just 0 for
   every
 pixel. However on some setups the texture do
   contain
 random data.
   
 For my case I do need to assume that the fresh
 allocated textures do contain 0 as values. Hence
   I
 need something like cleanup function, which do
   bring
 the texture in a defined state after it was
   allocated.
 Therefor I would like to write a patch for the
   texture
 classes which do fill the texture with some
   defined
 value (default 0) during the allocation if user
   whish
 this.
   
 Any comments, ideas or suggestions?
   
   
 Best regards,
 Art
   
   
   
   
   
   
   
  E-Mails jetzt auf Ihrem Handy.
 www.yahoo.de/go
 ___
 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
  



   E-Mails jetzt auf Ihrem Handy.
  www.yahoo.de/go
  ___
  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] osgviewerQT shows garbage when viewer is destroyed and re-created

2008-05-07 Thread Robert Osfield
Hi Mathieu,

The error with -QOSGWidget looks to be a bug in this code, but its a
totally different path that the default path which uses
GraphicsWindowEmbedded to adapt the Viewer.  QOSGWidget is the most
flexible path for integration and long term I'd like this to be the
default route under Qt.  My own time is rather stretched out so I
can't address all these things at once.

The issues you are seeing with the default path is very unlikely to be
related to transparency, most likely is issues with display lists or
texture objects being reused inappropriately.  In theory the viewer
should be release OpenGL objects when the context is destroyed, but
with GraphicsWindowEmbedded not all the standard functionality for
managing OpenGL objects is available, so perhaps this step is not
being executed appropriately.

One thing you could try is a

viewer-getSceneData()-releaseGLObjects();
osg::GLObjects::discardAllDeletedGLObjects(0);

In between the viewer allocations.

Robert.

On Wed, May 7, 2008 at 11:59 AM, Mathieu Champlon
[EMAIL PROTECTED] wrote:
 Hello,

  Thanks for your reply !

  I am indeed running osgviewerQT windows.ive.
  If I add --QOSGWidget I get this error message right away : Windows Error
 #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable to create
 OpenGL rendering context. Reason: The pixel format is invalid.
  Followed by a crash (_gw is 0 in QOSGWidget::resizeEvent due to the failure
 to initialize properly).

  I'm using Qt 4 by the way, I forgot to mention it.
  And also I have loads of .ive working fine, this one is among the 3 or 4
 which exhibit the issue. It looks like the common trait might have to do
 with transparency.

  I also tried the same test procedure with examples/osgwindows and it works
 fine.
  Moreover I just tested on a Windows XP with an (old FireGL V3100) ATI
 graphics card and everything works perfectly.

  Do you have any suggestion ?
  Should I just wait and hope for the next NVidia drivers ? :)

  Thanks !
  MAT.



  Robert Osfield wrote:

  Hi Mathieu,
 
  I've tried your windows.ive and the suggested mods to osgviewerQT and
  it works fine even for running 6 viewers consecutively  using
  osgviewerQT windows.ive, but if I add --QOSGWidget I get a crash on
  the second run.
 
  FYI, I'm running under Linux.
 
  What command line are you using?
 
  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] Changing texture coordinates of built-in shape drawables

2008-05-07 Thread Bob Kuehne

in general, don't use shape drawables if performance is important. shape
drawables render in immediate mode: the slowest form of rendering on  
modern gfx

hardware. this is a topic paul and i discuss in our course in detail.

bob

ps - shameless plug: next osg course: june 11-13, boulder colorado
On May 7, 2008, at 7:02 AM, Robert Osfield wrote:


Hi Franclin,

You can't modify the texture coordinates of ShapeDrawable, as explain
yesterday, ShapeDrawable is just a simple class for enabling rendering
shape primitives, its not meant as a general purpose rendering tool.
Please build geometries using osg::Geometry as per the osggeometry
example for general purpose rendering.

Robert.



On Wed, May 7, 2008 at 11:00 AM, Franclin Foping [EMAIL PROTECTED]  
wrote:

Hi,
I would like to achieve a multitexture effect on built-in shape  
drawable

objects (Box, Capsules and so forth).
My question is how to get and/or change the texture coordinates of  
these

objects?
Waiting for your reply.
Franclin.


__
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection
possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



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


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


Re: [osg-users] How to get the Handle for C# displays

2008-05-07 Thread Glenn Waldron
Ernest,

Here's a code snippet. This is C++/CLI but you will get the idea. Grab the
Handle property from your .NET control and pass it to the Traits of your new
graphics context:

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-November/004540.html

HTH -gw

On Tue, May 6, 2008 at 9:52 PM, Ernest Abbott [EMAIL PROTECTED]
wrote:

  I'm very very new to OSG. I'm writing in C# and have a limited
 understanding of C++. I am, as vehicle of learning OSG, converting a sample
 OSG C++ program to C#. I want to be able to display my rendered image in an
 area within my windows Form. I realise that I need to get the handle for the
 render object, which is easily done. But I can't see where/how I can let OSG
 know what this handle is. ie How can I pass the handle to OSG so that it
 renders within my window control?

 A bit of sample code would be of a great help.

 regards

 Ernest Abbott

 --
 Messenger's gone Mobile! Get it 
 now!http://clk.atdmt.com/UKM/go/msnnkmgl001001ukm/direct/01/

 ___
 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


[osg-users] How to change shape?

2008-05-07 Thread Jeongseok Lee
Here is my code for explain.

 

Geode* NewGeode1 = Geode;

ShapeDrawable* pShapeDrawable = ShapeDrawable;

Geode-addDrawable(pShapeDrawable);

// 1. Box : This works well

pxgLink-m_rpShapeDrawable-setShape(new Box(Vec3(0.0, 0.0, 0.0),  width,
depth, height));

 

// 2. Sphere : This doesn't work! The shape do not be changed from BOX to
SPHERE

pxgLink-m_rpShapeDrawable-setShape(new Sphere(Vec3(0.0, 0.0, 0.0),
radius));

 

What should I do?

 



Jeongseok Lee

MS Candidate

Robotics Laboratory

School of Mechanical  Aerospace Engineering

Seoul National University

Tel : +82-2-880-7149

Cell : +82-10-8958-3791

E-mail :  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]

 

 

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


Re: [osg-users] How to change shape?

2008-05-07 Thread Robert Osfield
Hi Jeongseok,

By default the OSG uses display lists to speed up rendering, but the
downside is that rendering once built into the display lists won't be
updated automatically.  To get ShapeDrawable to update the display
list simple do drawable-dirtyDisplayList(false).

Robert.

On Wed, May 7, 2008 at 1:23 PM, Jeongseok Lee [EMAIL PROTECTED] wrote:




 Here is my code for explain.



 Geode* NewGeode1 = Geode;

 ShapeDrawable* pShapeDrawable = ShapeDrawable;

 Geode-addDrawable(pShapeDrawable);

 // 1. Box : This works well

 pxgLink-m_rpShapeDrawable-setShape(new Box(Vec3(0.0, 0.0, 0.0),  width,
 depth, height));



 // 2. Sphere : This doesn't work! The shape do not be changed from BOX to
 SPHERE

 pxgLink-m_rpShapeDrawable-setShape(new Sphere(Vec3(0.0, 0.0, 0.0),
 radius));



 What should I do?



 

 Jeongseok Lee

 MS Candidate

 Robotics Laboratory

 School of Mechanical  Aerospace Engineering

 Seoul National University

 Tel : +82-2-880-7149

 Cell : +82-10-8958-3791

 E-mail : [EMAIL PROTECTED]




 ___
  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] MultiThreads in OSG

2008-05-07 Thread Renan Mendes
Thanks, Robert, for the tips. My intention when using multithreading is to
try and solve a problem about an input device (I don't know if you remember
me posting it). Well, the thing is, I'm putting the function that gets my
device's output in the FRAME loop. But it locks the normal execution of my
application if I don't touch (i.e. activate) my input device. That's why I
needed another thread: to get another 'route' when my device wasn't
activated.

I don't know if you or Paul have already suggested that I added my class as
a new Event Handler to the viewer doing some modifications which I don't
recall. I'll look into the archives for that message, and perhaps I'll
continue that topic to get some more details abput your solution.

Thanks again.

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


[osg-users] RE : Re: OSG tutorials available

2008-05-07 Thread Franclin Foping
Dear Roland,
 Thanks a lot for your hint. I will have a go at the wiki tomorrow. If I manage 
to find out how to upload the sources and tutorials, I will do it. Otherwise, I 
will post a message here on the forum.
 Regards,
 F.

Smeenk, R.J.M. (Roland) [EMAIL PROTECTED] a écrit : Franclin,
  
 Do you mean the tutorials in the Wiki? Please feel free to  update/attach the 
sources in the Wiki to work with OSG 2.4.
  
 --
 Roland

   
-
   From:[EMAIL PROTECTED][mailto:[EMAIL PROTECTED] On Behalf Of
Franclin Foping
Sent: woensdag 7 mei 2008 12:17
To:osg-users@lists.openscenegraph.org
Subject: [osg-users] OSGtutorials available


   
Hi,
 I am currently compiling some OSG tutorials fornewbies. I think to be 
through next week.
 However, I would like toknow how I can publish them on the official 
website so that every user can usethem?
 Waiting for youranswer.
 Regards,
 Franclin.
   __
Do You Yahoo!?
Enfinir avec le spam? Yahoo! Mail vous offre la meilleure protection 
possiblecontre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail  

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

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


 __
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Set userdata in Plugins

2008-05-07 Thread David Callu
Hi Om


2008/5/6 Mike Weiblen [EMAIL PROTECTED]:

 You'll probably get the best and most exact answer by looking at the
 source code for the plugin.


Probably the first reflex to have ;-) for a simple thing like .shp plugin.

I have implemented this part of shp plugin. The only thing done by the .bdf
loader
is extracting shape attribut for each shape and store them in ShapeAttribut


HTH
David Callu


 -- mew



 On Mon, May 5, 2008 at 12:02 PM, om [EMAIL PROTECTED] wrote:
 
   Thanks for your reponse Paul,
   but I wanted to know what it does in the .dbf plugin, it would be great
 if
  somebody can tell what are the functionalities of .dbf plugin. What I
  understood is that it reads the dbf file and stores the data as
  ShapeAttribute, but is that all it does?
 
   Thanks
 
   Om
 
 
 
   Paul Martz wrote:
   It's like a void* in C. user data can be any pointer to a Referenced
  object.
  The data can be used any way your application wants.
   -Paul
 
 
 
 
   -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of om
  Sent: Monday, May 05, 2008 7:44 AM
  To: OpenSceneGraph Users
  Subject: [osg-users] Set userdata in Plugins
 
  Hi,
 
  I am having some problems with the .dbf plugin. Can sombody
  please tell what setUserData() method (in
  ESRIShapeReaderWriter.cpp)does? or where the data passed to
  the method is used?
 
  Thanks
 
  Om
 
  ___
  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
 
 
 
 
 
  ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 



 --
 Mike Weiblen -- Austin Texas USA -- http://mew.cx/
 ___
 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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Raymond de Vries

Hi Robert,

I believe I found a (copy-n-paste) error in the file 
PrecipitationEffect.cpp (at least in 2.4.0): I think that line 353 should be

if (!_particleColorUniform)

Best regards,
Raymond

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


Re: [osg-users] RE : Re: OSG tutorials available

2008-05-07 Thread Smeenk, R.J.M. (Roland)
See http://www.openscenegraph.org/projects/osg/wiki/Community/WikiLogIn
For login details.
 
--
Roland




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Franclin 
Foping
Sent: woensdag 7 mei 2008 14:44
To: OpenSceneGraph Users
Subject: [osg-users] RE : Re: OSG tutorials available


Dear Roland,
 Thanks a lot for your hint. I will have a go at the wiki tomorrow. If 
I manage to find out how to upload the sources and tutorials, I will do it. 
Otherwise, I will post a message here on the forum.
 Regards,
 F.

Smeenk, R.J.M. (Roland) [EMAIL PROTECTED] a écrit : 

Franclin,
 
Do you mean the tutorials in the Wiki? Please feel free to 
update/attach the sources in the Wiki to work with OSG 2.4.
 
--
Roland




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Franclin Foping
Sent: woensdag 7 mei 2008 12:17
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] OSG tutorials available


Hi,
 I am currently compiling some OSG tutorials for 
newbies. I think to be through next week.
 However, I would like to know how I can publish them 
on the official website so that every user can use them?
 Waiting for your answer.
 Regards,
 Franclin.

__
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la 
meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org

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



__
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection 
possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] laser scanner file

2008-05-07 Thread fabio riot
IM=Immediate mode rendering

2008/5/7 Robert Osfield [EMAIL PROTECTED]:
 Hi Fabio,

 On Tue, May 6, 2008 at 3:32 PM, fabio riot [EMAIL PROTECTED] wrote:
   About your advice...(how to render 1200 triangles file,ply)
   Once I break the model into smaller geometry (for example N=200
   geometry blocks with 6 triangles),
   have I to create a scene with one geode for each geometry? or only one
   geode containing all N geometry?
 
   I thought the first solution was the best...but trying both I'haven't
   noticed difference in frame rate

 Your biggest bottleneck will be the GPU, which is down to granularity
 and the way that you pass your data.  The exact way you hang the
 Geometries off the scene graph won't matter too much right now as you
 aren't CPU limited, later on once you have the GPU side working
 efficient you might see CPU overhead being an issue, then we can look
 at optimizing the scene graph structure, but right now don't worry
 about it.

  W.r.t Granularity try various tests with different number of
 triangles in each geometry, look for the sweet spot.

 W.r.t how you pass the data, VBO's will most likely be the best way.
 Also you need to reduce the amount of memory you using - use
 compressed versions of colours, share vertices as much as possible -
 use osg::DrawElementUShort.


   beside with smaller geometry I'have noticed an improvement in
   rendering performance using VBO or IM (about 5 fps (N=200) versus 1fps
   (N=1)),
   but the best solution seem to be DL (fps 15 in all case N=1 or N=220).
 
   For larger dataset (30.000.000 triangles) the program  is able to view
   the object, only using IM (switching off DL and VBO)

 What do you mean by IM?

 ___
 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] MultiThreads in OSG

2008-05-07 Thread Robert Osfield
Hi Renan,

Would it be possible to poll the device on each new frame?  The is
what osgViewer does internally for keyboard and mouse events, each
frame eventTraversals() is called this goes and polls for events.  In
your own frame loop you could do your own polling.  The osgviewerSDL
examples has an example of polling of events outwith of osgViewer.

If you can avoid needing an extra thread to poll the events then
you'll keep life simpler, as threading while perfectly doable does add
its own very steep learning curve.

Robert.

On Wed, May 7, 2008 at 1:31 PM, Renan Mendes [EMAIL PROTECTED] wrote:
 Thanks, Robert, for the tips. My intention when using multithreading is to
 try and solve a problem about an input device (I don't know if you remember
 me posting it). Well, the thing is, I'm putting the function that gets my
 device's output in the FRAME loop. But it locks the normal execution of my
 application if I don't touch (i.e. activate) my input device. That's why I
 needed another thread: to get another 'route' when my device wasn't
 activated.

 I don't know if you or Paul have already suggested that I added my class as
 a new Event Handler to the viewer doing some modifications which I don't
 recall. I'll look into the archives for that message, and perhaps I'll
 continue that topic to get some more details abput your solution.

 Thanks again.

 Renan M Z Mendes

 ___
  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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Robert Osfield
Hi Raymond,

Could you send me the complex modified file, this way I can be certain
about what line you think is wrong and what it should be.

Cheers,
Robert.

On Wed, May 7, 2008 at 1:46 PM, Raymond de Vries [EMAIL PROTECTED] wrote:
 Hi Robert,

  I believe I found a (copy-n-paste) error in the file
 PrecipitationEffect.cpp (at least in 2.4.0): I think that line 353 should be
  if (!_particleColorUniform)

  Best regards,
  Raymond

  ___
  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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Robert Osfield
On Wed, May 7, 2008 at 1:54 PM, Robert Osfield [EMAIL PROTECTED] wrote:
  Could you send me the complex modified file,

Oppss... I meant to write complete modified file ;-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] RE : Re: OSG tutorials available

2008-05-07 Thread Robert Osfield
Hi Franclin,

It's good to hear that you've put together a tutorial set, this will
be very useful to the community.

As a first cut I'd suggest uploading pages + sources to the Community
or the Documentation section of the wiki.  Making the sources
available via SVN hosted on the OSG server is certainly a possibitly -
one we've already thought about, but not yet followed through:

   http://www.openscenegraph.org/projects/osgTutorial

Robert.

On Wed, May 7, 2008 at 1:44 PM, Franclin Foping [EMAIL PROTECTED] wrote:
 Dear Roland,
  Thanks a lot for your hint. I will have a go at the wiki tomorrow. If I
 manage to find out how to upload the sources and tutorials, I will do it.
 Otherwise, I will post a message here on the forum.
  Regards,
  F.

 Smeenk, R.J.M. (Roland) [EMAIL PROTECTED] a écrit :


 Franclin,

 Do you mean the tutorials in the Wiki? Please feel free to update/attach the
 sources in the Wiki to work with OSG 2.4.

 --
 Roland


  
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Franclin
 Foping
 Sent: woensdag 7 mei 2008 12:17
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] OSG tutorials available


 Hi,
  I am currently compiling some OSG tutorials for newbies. I think to be
 through next week.
  However, I would like to know how I can publish them on the official
 website so that every user can use them?
  Waiting for your answer.
  Regards,
  Franclin.

 __
 Do You Yahoo!?
 En finir avec le spam? Yahoo! Mail vous offre la meilleure protection
 possible contre les messages non sollicités
 http://mail.yahoo.fr Yahoo! Mail This e-mail and its contents are subject to
 the DISCLAIMER at http://www.tno.nl/disclaimer/email.html

 ___
 osg-users mailing list

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




  __
 Do You Yahoo!?
 En finir avec le spam? Yahoo! Mail vous offre la meilleure protection
 possible contre les messages non sollicités
 http://mail.yahoo.fr Yahoo! Mail
 ___
  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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Raymond de Vries

Hehe, it sure is complex ;-)

I've attached the file with the very complex fix ;)

regards
Raymond

btw I thought to send it via osg-submissions first, but since it's such 
a tiny fix I thought this channel would be fine too.


Robert Osfield wrote:

On Wed, May 7, 2008 at 1:54 PM, Robert Osfield [EMAIL PROTECTED] wrote:
  

 Could you send me the complex modified file,



Oppss... I meant to write complete modified file ;-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  


/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This 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.
*/


#includeOpenThreads/ScopedLock

#includeosg/Texture2D
#includeosg/PointSprite
#includeosgDB/FileUtils
#includeosgUtil/CullVisitor
#includeosgUtil/GLObjectsVisitor

#include osgParticle/PrecipitationEffect

#include osg/Notify
#include osg/io_utils
#include osg/Timer

using namespace osgParticle;

#define USE_LOCAL_SHADERS

static float random(float min,float max) { return min + 
(max-min)*(float)rand()/(float)RAND_MAX; }

static void fillSpotLightImage(unsigned char* ptr, const osg::Vec4 
centerColour, const osg::Vec4 backgroudColour, unsigned int size, float power)
{
if (size==1)
{
float r = 0.5f;
osg::Vec4 color = centerColour*r+backgroudColour*(1.0f-r);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
return;
}

float mid = (float(size)-1.0f)*0.5f;
float div = 2.0f/float(size);
for(unsigned int r=0;rsize;++r)
{
//unsigned char* ptr = image-data(0,r,0);
for(unsigned int c=0;csize;++c)
{
float dx = (float(c) - mid)*div;
float dy = (float(r) - mid)*div;
float r = powf(1.0f-sqrtf(dx*dx+dy*dy),power);
if (r0.0f) r=0.0f;
osg::Vec4 color = centerColour*r+backgroudColour*(1.0f-r);
*ptr++ = (unsigned char)((color[0])*255.0f);
*ptr++ = (unsigned char)((color[1])*255.0f);
*ptr++ = (unsigned char)((color[2])*255.0f);
*ptr++ = (unsigned char)((color[3])*255.0f);
}
}
}

static osg::Image* createSpotLightImage(const osg::Vec4 centerColour, const 
osg::Vec4 backgroudColour, unsigned int size, float power)
{

#if 0
osg::Image* image = new osg::Image;
unsigned char* ptr = image-data(0,0,0);
fillSpotLightImage(ptr, centerColour, backgroudColour, size, power);

return image;
#else
osg::Image* image = new osg::Image;
osg::Image::MipmapDataType mipmapData;
unsigned int s = size;
unsigned int totalSize = 0;
unsigned i;
for(i=0; s0; s=1, ++i)
{
if (i0) mipmapData.push_back(totalSize);
totalSize += s*s*4;
}

unsigned char* ptr = new unsigned char[totalSize];
image-setImage(size, size, size, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, ptr, 
osg::Image::USE_NEW_DELETE,1);

image-setMipmapLevels(mipmapData);

s = size;
for(i=0; s0; s=1, ++i)
{
fillSpotLightImage(ptr, centerColour, backgroudColour, s, power);
ptr += s*s*4;
}

return image;
#endif
}


PrecipitationEffect::PrecipitationEffect()
{
setNumChildrenRequiringUpdateTraversal(1);

setUpGeometries(1024);

rain(0.5);
}

void PrecipitationEffect::rain(float intensity)
{
_wind.set(0.0f,0.0f,0.0f);
_particleSpeed = -2.0f + -5.0f*intensity;
_particleSize = 0.01 + 0.02*intensity;
_particleColor = osg::Vec4(0.6, 0.6, 0.6, 1.0) -  osg::Vec4(0.1, 0.1, 0.1, 
1.0)* intensity;
_maximumParticleDensity = intensity * 8.5f;
_cellSize.set(5.0f / (0.25f+intensity), 5.0f / (0.25f+intensity), 5.0f);
_nearTransition = 25.f;
_farTransition = 100.0f - 60.0f*sqrtf(intensity);

if (!_fog) _fog = new osg::Fog;

_fog-setMode(osg::Fog::EXP);
_fog-setDensity(0.005f*intensity);
_fog-setColor(osg::Vec4(0.5, 0.5, 0.5, 1.0));

_useFarLineSegments = false;

_dirty = true;

update();
}

void PrecipitationEffect::snow(float intensity)
{
_wind.set(0.0f,0.0f,0.0f);
_particleSpeed = -0.75f - 0.25f*intensity;
_particleSize = 0.02f + 0.03f*intensity;
_particleColor = osg::Vec4(0.85f, 0.85f, 0.85f, 1.0f) -  osg::Vec4(0.1f, 

Re: [osg-users] Freetype plugin doesn't appear in project list (OSG 2.4.0, Cmake 2.4.8, Vista, Vis C++ express)

2008-05-07 Thread Jean-Sébastien Guay

Hi David,

All slightly wierd CMake behaviour , but all fixed now through manually 
pointing _freetype and _ft2build. Maybe something to do with 
non-standard 3rdParty location?


What is that non-standard 3rdParty location? You mentioned your 
dependencies are in D:/Code/3rdparty/include, but where is your OSG 
source tree in relation to that?


I have noticed that if CMake finds the 3rdParty dir by itself (either 
because it's parallel ot the OSG sources, or because it's in one of the 
predefined searched locations like C:\Program Files\OpenSceneGraph, or 
because it's in a subdirectory of OSG_ROOT or some other environment 
variable that it searches) then things seem to work, but if you point 
CMake to it by modifying ACTUAL_3RDPARTY_DIR yourself, sometimes some 
libs will not be found correctly. Perhaps that's what's happening here?


Also problems could happen if CMake finds some libs in your 3rdParty dir 
and some others elsewhere on your system (which should not happen except 
if CMake does not find your 3rdParty dir the first time you click 
Configure, but you have to point it to the right place). So that's 
certainly something to check for.


As mentioned in another post yesterday, I generally stick to a structure 
like this:


.../somedir/3rdParty
.../somedir/OpenSceneGraph (contains top-level CMakeLists.txt)
.../somedir/OpenSceneGraph/src (etc.)

and that seems to work very well. The CMake files should be fixed so 
that other usage models work too if they are expected to work, but I 
think this is the generally-accepted known working structure.


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] Fix for error in PrecipitationEffect.cpp

2008-05-07 Thread Gordon Tomlinson
Hi Raymond 

Thanks for your contribution,

But for Roberts sanity  please
http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProt
ocol
For the correct submission methods for OSG.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Raymond de
Vries
Sent: Wednesday, May 07, 2008 9:03 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Fix for error in PrecipitationEffect.cpp

Hehe, it sure is complex ;-)

I've attached the file with the very complex fix ;)

regards
Raymond

btw I thought to send it via osg-submissions first, but since it's such a
tiny fix I thought this channel would be fine too.

Robert Osfield wrote:
 On Wed, May 7, 2008 at 1:54 PM, Robert Osfield [EMAIL PROTECTED]
wrote:
   
  Could you send me the complex modified file,
 

 Oppss... I meant to write complete modified file ;-) 
 ___
 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] Leaks

2008-05-07 Thread Can T. Oguz
Hello Everybody,

I get lots of memory leak reports when I use OSG within MFC framework (VS
8). Even when I run osgviewerMFC example.

What do I miss?

Another point is that I need to use single frame rendering instead of
simulation loop (steady scenes in MFC views). Would it be ok if I simply
call viewer::frame() for each incoming paint request ?

Thanks a lot for the reading,

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


Re: [osg-users] How to change shape?

2008-05-07 Thread Jeongseok Lee
Hi Robert,

I'm so surprised, because I received mail from you. :-)
Thanks for your help.
I solved the problem with your solution. Thanks!

I think OSG is so cool graphic library!
I am having developed some graphic library for 3d robot simulator, about for
1years.
OSG is very good for this. ^^
I hope that I am good at using OSG, sooner or later.

Jeongseok.


-Original Message-
From: Robert Osfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 9:31 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to change shape?

Hi Jeongseok,

By default the OSG uses display lists to speed up rendering, but the
downside is that rendering once built into the display lists won't be
updated automatically.  To get ShapeDrawable to update the display
list simple do drawable-dirtyDisplayList(false).

Robert.

On Wed, May 7, 2008 at 1:23 PM, Jeongseok Lee [EMAIL PROTECTED] wrote:




 Here is my code for explain.



 Geode* NewGeode1 = Geode;

 ShapeDrawable* pShapeDrawable = ShapeDrawable;

 Geode-addDrawable(pShapeDrawable);

 // 1. Box : This works well

 pxgLink-m_rpShapeDrawable-setShape(new Box(Vec3(0.0, 0.0, 0.0),  width,
 depth, height));



 // 2. Sphere : This doesn't work! The shape do not be changed from BOX to
 SPHERE

 pxgLink-m_rpShapeDrawable-setShape(new Sphere(Vec3(0.0, 0.0, 0.0),
 radius));



 What should I do?



 

 Jeongseok Lee

 MS Candidate

 Robotics Laboratory

 School of Mechanical  Aerospace Engineering

 Seoul National University

 Tel : +82-2-880-7149

 Cell : +82-10-8958-3791

 E-mail : [EMAIL PROTECTED]




 ___
  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] MultiThreads in OSG

2008-05-07 Thread Zoltán
Hello,

there is something I don't understand:

you say that threading is a complex matter, and if possible 
better to avoid:

Robert Osfield wrote on Wednesday 07 May 2008:
 as threading while perfectly doable does add its own 
 very steep learning curve.

yet you also said that SDL is not very good because it 
prevents multi-threading:

 Personally I wouldn't recommend SDL for windowing for
 serious 3d graphics applications, its just way too
 limiting - its really just designed for single threaded,
 single context apps.

 http://lists.openscenegraph.org/pipermail/osg-users-opens
cenegraph.org/2007-August/000558.html

How do I know whether my application needs multi-threading ? 
Or multiple contexts ?
If I have to use SDL anyway (for joystick handling) would 
that make it automatically single-threaded ?
What limitations would SDL impose if I created the window 
and graphical context with it, for OSG to render in it ?

What I have is:

viewer.realize();
while ( !viewer.done()  !quit )
{
[...]
if (joystick) inputDev.handleJoystick();
[...]
viewer.getCamera()-setViewMatrix( CameraMatrix );
viewer.frame();
}

If multi-threading is complex, I'll avoid it anyway, so SDL 
might not limit me in this case.

I'm a bit confused.

Zoltán


-- 
 


Zoltan

http://sourceforge.net/projects/zsim


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


Re: [osg-users] MultiThreads in OSG

2008-05-07 Thread Robert Osfield
Hi Zoltan,

SDL is design around single threaded, single context model for doing
windowing, for a general purpose and scalable scene graph like the OSG
this is pretty restrictive, so I would recommend using SDL for
windowing, and would suggest one use osgViewer's native windowing
support as this supports multi-threading, multiple graphics context
and pbuffers without any complexity being pushed on the user.

SDL however is good for device support like joysticks, and its use
works just fine with an osgViewer based app, just poll the events from
the frame loop as I previously suggested.

Robert.

On Wed, May 7, 2008 at 2:36 PM, Zoltán [EMAIL PROTECTED] wrote:
 Hello,

  there is something I don't understand:

  you say that threading is a complex matter, and if possible
  better to avoid:

  Robert Osfield wrote on Wednesday 07 May 2008:

  as threading while perfectly doable does add its own
   very steep learning curve.

  yet you also said that SDL is not very good because it
  prevents multi-threading:

   Personally I wouldn't recommend SDL for windowing for
   serious 3d graphics applications, its just way too
   limiting - its really just designed for single threaded,
   single context apps.
  
   http://lists.openscenegraph.org/pipermail/osg-users-opens
  cenegraph.org/2007-August/000558.html

  How do I know whether my application needs multi-threading ?
  Or multiple contexts ?
  If I have to use SDL anyway (for joystick handling) would
  that make it automatically single-threaded ?
  What limitations would SDL impose if I created the window
  and graphical context with it, for OSG to render in it ?

  What I have is:

 viewer.realize();
 while ( !viewer.done()  !quit )
 {
 [...]
 if (joystick) inputDev.handleJoystick();
 [...]
 viewer.getCamera()-setViewMatrix( CameraMatrix );
 viewer.frame();
 }

  If multi-threading is complex, I'll avoid it anyway, so SDL
  might not limit me in this case.

  I'm a bit confused.

  Zoltán


  --

  

  Zoltan

  http://sourceforge.net/projects/zsim
  




  ___
  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] osgForge: what's the status?

2008-05-07 Thread Jean-Sébastien Guay

Hello Robert et al,

First of all, an announcement: I have finished my Masters. My thesis was 
accepted unanimously and apart from some small corrections, the comments 
were good. I'm happy! :-)


I was thinking of publishing my Masters project under the OSGPL. It's an 
interesting program (at least I think so) that combines basic 
Precomputed Radiance Transfer [Sloan2002] and a modified Shading Cache 
[Tole2002] using OSG for realtime rendering as well as Adian Egli's 
generously contributed kdtree for raytracing.


You have often spoken of an osgForge site that you wanted to set up and 
which would allow hosting of different OSG-related projects. Will that 
site see the light of day anytime soon? It would be a nice place where 
my project could live and others could contribute to it if they find it 
useful. And in a more general sense, I think it would be very cool to 
group all the cool projects that people want to make available to 
others, and it would encourage others to use them and contribute to them 
as was done with OSG itself, but on a smaller and even more distributed 
scale.


Otherwise I can always make a googlecode project or something, or even 
just open up my local SVN for read-only access, but I'd prefer to host 
it somewhere where potential problems with my own computer 
infrastructure would not affect it, and an osgForge would provide some 
nice visibility too. :-)


If I can help make osgForge a reality, let me know.

Thanks,

J-S

[Sloan2002] Peter-Pike Sloan, Jan Kautz and John Snyder  Precomputed 
Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency 
Lighting Environments


[Tole2002] Parag Tole, Fabio Pellacini, Bruce Walter and Donald P. 
Greenberg  Interactive Global Illumination in Dynamic Scenes

--
__
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] MultiThreads in OSG

2008-05-07 Thread Jean-Sébastien Guay

Hi Zoltan,

I think what Robert meant was that threading is a complex topic if you 
want to dive in and code it all yourself. osgViewer takes care of all 
this for you, so you can use it and have your application multi-threaded 
without having to deal with that complexity. Think of it as an 
abstraction layer. It's done, just *use* it and don't really worry about 
*how* it's done.


On the other hand, SDL's graphics functionality is totally orthogonal to 
its input functionality. If you want to use SDL for joystick support, 
you can do so as described in previous posts. Just don't use its 
graphics and windowing functions, and let osgViewer do its work.


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] Performance decrease with 2.4.0

2008-05-07 Thread DC Fennell

Hi Robert,

Yes. I am using Release builds. The load times differ significantly. I have 
not been able to pin it down exactly. I'm curious if anyone else has 
experienced this.


Chris.

- Original Message - 
From: Robert Osfield [EMAIL PROTECTED]

To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, May 07, 2008 4:41 AM
Subject: Re: [osg-users] Performance decrease with 2.4.0



Hi Chris,

There isn't any major changes to rendering in 2.4.0, so you should get
pretty well the same performance profile from 2.4.0.

Perhaps it's an issue as simply as build options - are you compiling
under Release build under 2.4?

Robert.

On Tue, May 6, 2008 at 8:59 PM, DC Fennell [EMAIL PROTECTED] 
wrote:



Hi everybody,

Our application is loading IVEs and DDS textures. With OSG 2.4.0, the 
load

times seem to have been increased significantly and the framerate in our
scenes has decreased around 10%. It's quite difficult to figure out what
exactly has caused this based on the changes from 2.2.0 to 2.4.0.

Does anyone have any possible explanations for this behavior?

Thanks
Chris

___
 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] osgForge: what's the status?

2008-05-07 Thread Jeremy Moles

On Wed, 2008-05-07 at 10:07 -0400, Jean-Sébastien Guay wrote:
 Hello Robert et al,
 
 First of all, an announcement: I have finished my Masters. My thesis was 
 accepted unanimously and apart from some small corrections, the comments 
 were good. I'm happy! :-)

Congratulations!

 I was thinking of publishing my Masters project under the OSGPL. It's an 
 interesting program (at least I think so) that combines basic 
 Precomputed Radiance Transfer [Sloan2002] and a modified Shading Cache 
 [Tole2002] using OSG for realtime rendering as well as Adian Egli's 
 generously contributed kdtree for raytracing.
 
 You have often spoken of an osgForge site that you wanted to set up and 
 which would allow hosting of different OSG-related projects. Will that 
 site see the light of day anytime soon? It would be a nice place where 
 my project could live and others could contribute to it if they find it 
 useful. And in a more general sense, I think it would be very cool to 
 group all the cool projects that people want to make available to 
 others, and it would encourage others to use them and contribute to them 
 as was done with OSG itself, but on a smaller and even more distributed 
 scale.
 
 Otherwise I can always make a googlecode project or something, or even 
 just open up my local SVN for read-only access, but I'd prefer to host 
 it somewhere where potential problems with my own computer 
 infrastructure would not affect it, and an osgForge would provide some 
 nice visibility too. :-)

Don't be afraid of googlecode--it's quite awesome...

 If I can help make osgForge a reality, let me know.
 
 Thanks,
 
 J-S
 
 [Sloan2002] Peter-Pike Sloan, Jan Kautz and John Snyder  Precomputed 
 Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency 
 Lighting Environments
 
 [Tole2002] Parag Tole, Fabio Pellacini, Bruce Walter and Donald P. 
 Greenberg  Interactive Global Illumination in Dynamic Scenes

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


Re: [osg-users] Multiple projective texture passes?

2008-05-07 Thread Jason Ziglar
So I've got multiple projective texturing passes working, but I've run 
into yet another problem. When the additional passes happen, they cause 
flickering, which appears to be from fighting between the various 
cameras projecting onto the scene.


I've tried using NESTED_RENDER on the cameras, increasing the camera 
values with a static counter, but they still fight. How would I go about 
removing the flicker from the different camera passes?


Thanks in advance,


Art Tevs wrote:

Hi,

if you want to have it to be extendable to n-passes, then you have to go the 
way you have proposed first. Create n camera's located on the same position. 
The subgraph scene of the camera should have your projective shader applied, so 
that if it get rendered then you have projected the correct texture on the 
scene.

Afterwards you have to combine them. The easiest way would be to use the osgPPU 
library (use the current svn version) where you can specify a shader which do 
combines all the camera views into one texture.
Of course this is still not a general solution, because you need to know how much cameras you have when you write your shader. 


Maybe the other solution would be to attach the same output texture to every 
camera's frame buffer object and use a shader and an adding-blend operation to 
write only the 1/n of the color value  to that texture . After all camera 
passes you will get the average value out of it.

Cheers,
Art





- Ursprüngliche Mail 
Von: Jason Ziglar [EMAIL PROTECTED]
An: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Gesendet: Montag, den 5. Mai 2008, 22:42:09 Uhr
Betreff: Re: [osg-users] Multiple projective texture passes?

I don't see any straightforward way to ensure that is is extensible to 
n-passes using that technique though. My understanding is that I can't 
have an array of matrices in the shader, so in order to add a single 
pass I'd have to go and recompile the entire program.


Is there a technique for having multiple transformation matrices without 
hard-coding the list of matrices?


Thanks in advance,


Art Tevs wrote:
  

Hi Jason,

I think, you do not need multiple cameras. If you have
the projective matricies of each of the captured
viewcamera, then you can just combine all the
projective textures in one pass. Just pass all your
matricies and corresponding textures to the shader and
compute the average value.

If you was able to setup the environment for the one
projective textures, then extending it to multiple
textures is not a big issue.

Cheers,
Art


--- Jason Ziglar [EMAIL PROTECTED] schrieb:

 


Hi all,
I'm trying to write a program which takes
multiple images and 
projectively textures a scene with them. The images
are taken at 
different locations within the scene, and I'd like
to have the scene 
rendered with the result from projecting all the
images onto the world 
geometry.


I've got a shader and code base which can
project a single image 
onto geometry, but I'm not entirely certain how to
extend this to 
multiple images. Multiple cameras seems like the
right idea, except that 
I don't see how to grab the correct transforms and
textures for a given 
camera and apply them to the scene in order. Any

suggestions?


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

   
  

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




  Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: 
http://de.yahoo.com/set

___
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



  E-Mails jetzt auf Ihrem Handy.
www.yahoo.de/go
___
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] Leaks

2008-05-07 Thread Can T. Oguz
Thank you very much for the detailed and quick answer. I'm checking out what
was written before.

Any words about the single frame rendering issue?

Best Regards,

Can

2008/5/7 Gordon Tomlinson [EMAIL PROTECTED]:

  There is a known issue/BUG  with MFC, were MFC makes a call to
 _CrtDumpMemoryLeaks() in the  destructor of the  _AFX_DEBUG_STATE, followed
 by _CrtSetDbgFlag()  which sets it to ~_CRTDBG_LEAK_CHECK_DF (therefor
 disabling memory  leak test at *true* program exit)  This  destructor is
 called at exit (i.e. atexit()), but before
 statics residing in dlls  and others are destroyed,  resulting in many false
 memory leaks are reported

 As to fix any real memory leaks, you have the source ... also you can do a
 google to see how others have gotten around this issue to get at any real
 leaks.


 The MFC memory leak will not go away as Microsoft have no reason to fix it(
 it been there for many years) as MFC is a deprecated API as far as they are
 concerned

 also see

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

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



 Regards

 Gordon


  --
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Can T. Oguz
 *Sent:* Wednesday, May 07, 2008 9:13 AM
 *To:* osg-users@lists.openscenegraph.org
 *Subject:* [osg-users] Leaks

   Hello Everybody,

 I get lots of memory leak reports when I use OSG within MFC framework (VS
 8). Even when I run osgviewerMFC example.

 What do I miss?

 Another point is that I need to use single frame rendering instead of
 simulation loop (steady scenes in MFC views). Would it be ok if I simply
 call viewer::frame() for each incoming paint request ?

 Thanks a lot for the reading,

 Can Oguz

 ___
 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] Performing non-rendering actions between renderbins

2008-05-07 Thread Jason Baurick
Hi Robert,

I'm implementing various sort-last compositing methods using OSG.  For depth
compositing you need to composite after the opaque data has been rendered
but before the transparent data has been rendered.  Compositing is actually
done with buffer transfers Read Pixels, Texture Images, PBOs, etc...

Since each view has to do different work I just added Geodes with custom
drawables to the scene graph which do the required GL action.  The problem
with this method is I'm adding at least one node for each GPU I want to work
with, in some sort-last cases multiple nodes per GPU.  This is not a clean
implementation in my opinion.  So I am looking for other ideas on how I can
insert operations in-between rendering bins.

- Jason
On Wed, May 7, 2008 at 2:59 AM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Jason,

 What do types of operations are you looking to do?

 Robert.

 On Mon, Apr 28, 2008 at 9:58 PM, Jason Baurick [EMAIL PROTECTED] wrote:
  Hi,
 
  I recently started working with OSG and I have what is hopefully a
 simple
  question.  I have a composite viewer with two views, I want to perform
 an
  action on the buffers in each view between the opaque rendering and the
  transparent rendering, each view needs to perform a different action.
  Currently to make this work I added two nodes to my scene graph, culled
 out
  one for each view and then stuck them in a renderbin between the opaque
 and
  transparent bins.  So I guess what I'm asking is if there is a simpler
 way
  to do this?  I tried setting up camera callbacks, but this happens at
 the
  wrong point, my next thought would be to overload the draw traversal.
 
  Any suggestions would be welcomed, thank you in advance.
 
  --
  --Jason Baurick
 
  ___
   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




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


Re: [osg-users] CTDB and OSG

2008-05-07 Thread Leontyev, Sergey
Thanks for the help. I see...
Sergey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgForge: what's the status?

2008-05-07 Thread Cedric Pinson

Hi,
If it can helps i have space on my server, so if someone wants to start 
something i can share my place, instanciate a vserver osgForge. If one 
is interested he can send me a ssh key and i will provide the space and 
a fresh linux distrib ready to use.


   Cedric

Jean-Sébastien Guay wrote:

Hi Jeremy,


Congratulations!


Thanks!


Don't be afraid of googlecode--it's quite awesome...


I'm sure it is, but if there's going to be an osgForge it would make 
sense for it to be hosted there. I can always put it on googlecode and 
move it when/if osgForge gets set up.


J-S


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


Re: [osg-users] Multiple projective texture passes?

2008-05-07 Thread Art Tevs
Hi,

So what you get is a z-fighting artefacts which comes
from rendering pixels on the same depth position where
other pixels already exists. Sometimes they are drawn,
sometimes not.

Hence do disable depth reading on other passes which
will force to use the depth values just from the first
pass if you have your depth buffer shared.


Cheers,
Art


--- Jason Ziglar [EMAIL PROTECTED] schrieb:

 So I've got multiple projective texturing passes
 working, but I've run 
 into yet another problem. When the additional passes
 happen, they cause 
 flickering, which appears to be from fighting
 between the various 
 cameras projecting onto the scene.
 
 I've tried using NESTED_RENDER on the cameras,
 increasing the camera 
 values with a static counter, but they still fight.
 How would I go about 
 removing the flicker from the different camera
 passes?
 
 Thanks in advance,
 
 
 Art Tevs wrote:
  Hi,
 
  if you want to have it to be extendable to
 n-passes, then you have to go the way you have
 proposed first. Create n camera's located on the
 same position. The subgraph scene of the camera
 should have your projective shader applied, so that
 if it get rendered then you have projected the
 correct texture on the scene.
 
  Afterwards you have to combine them. The easiest
 way would be to use the osgPPU library (use the
 current svn version) where you can specify a shader
 which do combines all the camera views into one
 texture.
  Of course this is still not a general solution,
 because you need to know how much cameras you have
 when you write your shader. 
 
  Maybe the other solution would be to attach the
 same output texture to every camera's frame buffer
 object and use a shader and an adding-blend
 operation to write only the 1/n of the color value 
 to that texture . After all camera passes you will
 get the average value out of it.
 
  Cheers,
  Art
 
 
 
 
 
  - Ursprüngliche Mail 
  Von: Jason Ziglar [EMAIL PROTECTED]
  An: OpenSceneGraph Users
 osg-users@lists.openscenegraph.org
  Gesendet: Montag, den 5. Mai 2008, 22:42:09 Uhr
  Betreff: Re: [osg-users] Multiple projective
 texture passes?
 
  I don't see any straightforward way to ensure that
 is is extensible to 
  n-passes using that technique though. My
 understanding is that I can't 
  have an array of matrices in the shader, so in
 order to add a single 
  pass I'd have to go and recompile the entire
 program.
 
  Is there a technique for having multiple
 transformation matrices without 
  hard-coding the list of matrices?
 
  Thanks in advance,
 
 
  Art Tevs wrote:

  Hi Jason,
 
  I think, you do not need multiple cameras. If you
 have
  the projective matricies of each of the captured
  viewcamera, then you can just combine all the
  projective textures in one pass. Just pass all
 your
  matricies and corresponding textures to the
 shader and
  compute the average value.
 
  If you was able to setup the environment for the
 one
  projective textures, then extending it to
 multiple
  textures is not a big issue.
 
  Cheers,
  Art
 
 
  --- Jason Ziglar [EMAIL PROTECTED] schrieb:
 
   
  
  Hi all,
  I'm trying to write a program which takes
  multiple images and 
  projectively textures a scene with them. The
 images
  are taken at 
  different locations within the scene, and I'd
 like
  to have the scene 
  rendered with the result from projecting all the
  images onto the world 
  geometry.
 
  I've got a shader and code base which can
  project a single image 
  onto geometry, but I'm not entirely certain how
 to
  extend this to 
  multiple images. Multiple cameras seems like the
  right idea, except that 
  I don't see how to grab the correct transforms
 and
  textures for a given 
  camera and apply them to the scene in order. Any
  suggestions?
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 

 

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
 
 
 
Machen Sie Yahoo! zu Ihrer Startseite. Los
 geht's: 
  http://de.yahoo.com/set
  ___
  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
 
 
 
E-Mails jetzt auf Ihrem Handy.
  www.yahoo.de/go
  ___
  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
 



  Lesen Sie Ihre E-Mails jetzt 

Re: [osg-users] Leaks

2008-05-07 Thread Gordon Tomlinson
There is a known issue/BUG  with MFC, were MFC makes a call to

_CrtDumpMemoryLeaks() in the  destructor of the  _AFX_DEBUG_STATE, followed

by _CrtSetDbgFlag()  which sets it to ~_CRTDBG_LEAK_CHECK_DF (therefor

disabling memory  leak test at *true* program exit)  This  destructor is

called at exit (i.e. atexit()), but before

statics residing in dlls  and others are destroyed,  resulting in many false

memory leaks are reported



As to fix any real memory leaks, you have the source ... also you can do a

google to see how others have gotten around this issue to get at any real

leaks.





The MFC memory leak will not go away as Microsoft have no reason to fix it(

it been there for many years) as MFC is a deprecated API as far as they are

concerned
also see
http://www.mail-archive.com/[EMAIL PROTECTED]/msg11253.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg08551.html
 
Regards
Gordon

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Can T. Oguz
Sent: Wednesday, May 07, 2008 9:13 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Leaks


Hello Everybody,
 
I get lots of memory leak reports when I use OSG within MFC framework (VS
8). Even when I run osgviewerMFC example. 
 
What do I miss?
 
Another point is that I need to use single frame rendering instead of
simulation loop (steady scenes in MFC views). Would it be ok if I simply
call viewer::frame() for each incoming paint request ? 
 
Thanks a lot for the reading,
 
Can Oguz
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MultiThreads in OSG

2008-05-07 Thread Zoltán
Jean-Sébastien Guay wrote on Wednesday 07 May 2008:
 I think what Robert meant was that threading is a complex
 topic if you want to dive in and code it all yourself.
 osgViewer takes care of all this for you,

Ah OK, I understand.

 On the other hand, SDL's graphics functionality is
 totally orthogonal to its input functionality. If you
 want to use SDL for joystick support, you can do so as
 described in previous posts. Just don't use its graphics
 and windowing functions, and let osgViewer do its work.

All the better, that's what I do today.

Thanks for the explanation. Cheers

Zoltán





-- 
 


Zoltan

http://sourceforge.net/projects/zsim


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


Re: [osg-users] osgForge: what's the status?

2008-05-07 Thread Jean-Sébastien Guay

Hi Cedric,

If it can helps i have space on my server, so if someone wants to start 
something i can share my place, instanciate a vserver osgForge. If one 
is interested he can send me a ssh key and i will provide the space and 
a fresh linux distrib ready to use.


I was actually asking the question assuming some steps had already been 
taken.


If that is not the case, we'll need to make and manage a server 
ourselves, and your offer would be interesting. Is your server at your 
home, or is it a bit more organized than that? I'm thinking a bare 
minimum would be a UPS, and perhaps some site monitoring to ensure a 
certain uptime. What do you think? If it's a personal server, I think it 
would not be a good idea to start osgForge there because we couldn't 
guarantee that it would be always accessible...


The other part of the equation is the software to manage the projects 
and such. Tracs would be one option, and I think SourceForge's software 
infrastructure is open source as well? What do people think?


And finally, who would manage the site? I can help setting it up, but I 
don't think I could do the day-to-day creation of accounts and projects, 
making sure everything works, updating software, etc.


But before we go too far on this route, I'd like to know what Robert 
thinks. Was anything started on this? What were your plans?


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] LinkedIn group growing

2008-05-07 Thread Mike Weiblen
Hi all,

The OSG group on LinkedIn.com has hit 92 members, not bad at all.

LinkedIn is a pretty cool networking tool, pls feel free to join the
OSG group via
http://www.linkedin.com/e/gis/61724/6F710C14EBAF

Joining the group basically just adds the OSG badge to your page, and
makes it easier to search for other members of the same group (useful
when looking for consultants or new hires)

cheers
-- mew

-- 
Mike Weiblen -- Austin Texas USA -- http://mew.cx/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Load all 6 images from cubemap dds.

2008-05-07 Thread Jason Daly

Robert Osfield wrote:

Hi Joakim and Roland,

On Mon, May 5, 2008 at 6:46 PM, Smeenk, R.J.M. (Roland)
[EMAIL PROTECTED] wrote:
  

Joakim,

 I sent in a submission last year for loading complete cubemaps from DDS
 files. That submission affects important parts of the osg core and
 therefore Robert put it on the stack, which in practice means that it
 won't be merged soon.



This is a good reminder.  Now we have stable release out of the way
its not a bad time to start considering changes that might require
more widespread changes.

Roland could you have have a go at migrating your changes to 2.4/SVN
and then resubmit.
  


On a different, but related note, does anyone have an idea how one would 
go about reworking the isImageTranslucent() method of osg::Image to 
handle S3TC images (like you find in .dds files)?


--J

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


Re: [osg-users] LinkedIn group growing

2008-05-07 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mike Weiblen wrote:
 Hi all,
 
 The OSG group on LinkedIn.com has hit 92 members, not bad at all.
 
 LinkedIn is a pretty cool networking tool, pls feel free to join the
 OSG group via
 http://www.linkedin.com/e/gis/61724/6F710C14EBAF
 
 Joining the group basically just adds the OSG badge to your page, and
 makes it easier to search for other members of the same group (useful
 when looking for consultants or new hires)
 
 cheers
 -- mew
 

Just joined few hours ago :-p

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

iD8DBQFIIctgn11XseNj94gRAjrzAKCw3m7N4kfU4nQguV87eBM3IXuePwCgwuzv
p9JN2vd8Z3yO/Jjs6uWWo0M=
=l872
-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] osgForge: what's the status?

2008-05-07 Thread Cedric Pinson
No it's not a machine in my house :) it's a dedicated server where i use 
vserver for me and for other people, i dont provide tool to monitor, i 
just provide a vserver on a dedibox (http://www.dedibox.fr/) then you do 
what you want on it. You install what you want on it (linux of course)
If it does not fit with what you have in mind, i understand, i just 
propose that if someone want to start and he is stopped by this point.


Cheers
   Cedric

Jean-Sébastien Guay wrote:

Hi Cedric,

If it can helps i have space on my server, so if someone wants to 
start something i can share my place, instanciate a vserver osgForge. 
If one is interested he can send me a ssh key and i will provide the 
space and a fresh linux distrib ready to use.


I was actually asking the question assuming some steps had already 
been taken.


If that is not the case, we'll need to make and manage a server 
ourselves, and your offer would be interesting. Is your server at your 
home, or is it a bit more organized than that? I'm thinking a bare 
minimum would be a UPS, and perhaps some site monitoring to ensure a 
certain uptime. What do you think? If it's a personal server, I think 
it would not be a good idea to start osgForge there because we 
couldn't guarantee that it would be always accessible...


The other part of the equation is the software to manage the projects 
and such. Tracs would be one option, and I think SourceForge's 
software infrastructure is open source as well? What do people think?


And finally, who would manage the site? I can help setting it up, but 
I don't think I could do the day-to-day creation of accounts and 
projects, making sure everything works, updating software, etc.


But before we go too far on this route, I'd like to know what Robert 
thinks. Was anything started on this? What were your plans?


Thanks,

J-S


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


Re: [osg-users] osgForge: what's the status?

2008-05-07 Thread Jean-Sébastien Guay

Hi Robert,


Congrats on completing the Master.


Thanks!


W.r.t osgforge, this is already up and running - VirtualPlanetBuilder,
osgProducer and Present3D are the two projects of mine that are
hosted, osgLua, osgPython, osgDotNet are others.


What's the URL? osgforge.org gives me:
__

Domain Cloaking Error
We're sorry, we had a problem with our web panel when you set up 
cloaking for your domain osgforge.org!
Please go to the DreamHost Web Panel's Domains  Manage Domains area and 
click the [Edit] link next to osgforge.org to re-configure cloaking.


Error: no domain www.osgforge.org or osgforge.org; if you recently set 
this up, please wait up to one hour.

__


We'll need to the thumbs from UPV that its OK to host the projects as
it'll be on their server (the same one that runs openscenegraph.org +
SVN).  Jose Luis Hidalgo our server admin will need to set up the
Tracs/SVN for you, we'll need to ping Jose to ask about this.


Ok, will do (when I'm ready to do it).

What is the long-term vision for this? I think if we want this to become 
a useful community site, we should have automated tools for high-level 
project management, for example:


1. A person makes a request for a new project by filling in a web-based 
form.
2. The site manager approves the request (one click of a button, perhaps 
making sure the project name is valid and follows some rules) and then 
automated scripts create the Tracs site, SVN repo, etc.


Also, what kind of access do we have? Does someone who registers a 
project at osgForge have shell access to the part of the server relevant 
to his project? Can we register SVN pre/post-commit hooks? Can we change 
the skin on the Tracs site? :-)


Finally, are there regular backups?

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] How to load VRML file in OSG?

2008-05-07 Thread 이정석
Hi all.

I encounter with VRML file (*.wrl)
I have to load this VRML file on OSG.

How am I suppose to do?
Is there good example? even simple.

Thanks to everybody read my naive questions. :-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Back online but hundreds of posts to go...

2008-05-07 Thread Paul Melis

I did an initial restructuring in the wiki Sandbox. See
http://www.openscenegraph.org/projects/osg/wiki/SandBox/FAQ

Let me know what you think.

Paul

Robert Osfield wrote:


Hi Paul,

I must admit not having given the FAQ much attention in the last year.
It would be good to start updating it/reorganising it.   I'm fully
open to suggestions on how to improve it and assistance with improving
it.  I'd suggest kicking out a separate thread for this.

Robert.

 


It seems that a percentage of the posts on the lists can be considered
straight items from the FAQ on the website. I recently did a bit of editing
on the FAQ as it isn't really the most readable piece on the site.
Particularly, I updated some stuff that seemed to reference OSG versions
when Producer was still used, deleted/replaced broken URLs and fixed some
wording and spelling. However, I stil think it can be improved and hopefully
make more people consult it before posting to the list. Things I had in
mind:
- Structure the items in a few sections (e.g. Introduction/Overview,
Building/Installation, File formats, General development, Linux-specific,
Windows-specific, etc)
- Update the list of file formats to include information on read/write
support of all plugins
- osgViewer seems to be responsible for a fair amount of posts, perhaps it
deserves its own section in the FAQ?

Now, I don't have enough knowledge of every piece of OSG to edit all the
entries, but I'd be happy to continue improving the FAQ. I didn't see an
easy way for structuring, as currently an automatically generated overview
of the questions is used. Any tips there?

Paul

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

   


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

 



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


Re: [osg-users] MultiThreads in OSG

2008-05-07 Thread Mike Weiblen
gosh, if you used osgVRPN (or VRPN directly) you'd probably be running by now.
-- mew


On Wed, May 7, 2008 at 7:31 AM, Renan Mendes [EMAIL PROTECTED] wrote:
 Thanks, Robert, for the tips. My intention when using multithreading is to
 try and solve a problem about an input device (I don't know if you remember
 me posting it). Well, the thing is, I'm putting the function that gets my
 device's output in the FRAME loop. But it locks the normal execution of my
 application if I don't touch (i.e. activate) my input device. That's why I
 needed another thread: to get another 'route' when my device wasn't
 activated.

 I don't know if you or Paul have already suggested that I added my class as
 a new Event Handler to the viewer doing some modifications which I don't
 recall. I'll look into the archives for that message, and perhaps I'll
 continue that topic to get some more details abput your solution.

 Thanks again.

 Renan M Z Mendes

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





-- 
Mike Weiblen -- Austin Texas USA -- http://mew.cx/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Back online but hundreds of posts to go...

2008-05-07 Thread Mike Weiblen
Haven't had a chance to review, but Thank You Very Much for moving this forward!
-- mew


On Wed, May 7, 2008 at 11:33 AM, Paul Melis [EMAIL PROTECTED] wrote:
 I did an initial restructuring in the wiki Sandbox. See
  http://www.openscenegraph.org/projects/osg/wiki/SandBox/FAQ

  Let me know what you think.

  Paul



  Robert Osfield wrote:


  Hi Paul,
 
  I must admit not having given the FAQ much attention in the last year.
  It would be good to start updating it/reorganising it.   I'm fully
  open to suggestions on how to improve it and assistance with improving
  it.  I'd suggest kicking out a separate thread for this.
 
  Robert.
 
 
 
   It seems that a percentage of the posts on the lists can be considered
   straight items from the FAQ on the website. I recently did a bit of
 editing
   on the FAQ as it isn't really the most readable piece on the site.
   Particularly, I updated some stuff that seemed to reference OSG versions
   when Producer was still used, deleted/replaced broken URLs and fixed
 some
   wording and spelling. However, I stil think it can be improved and
 hopefully
   make more people consult it before posting to the list. Things I had in
   mind:
   - Structure the items in a few sections (e.g. Introduction/Overview,
   Building/Installation, File formats, General development,
 Linux-specific,
   Windows-specific, etc)
   - Update the list of file formats to include information on read/write
   support of all plugins
   - osgViewer seems to be responsible for a fair amount of posts, perhaps
 it
   deserves its own section in the FAQ?
  
   Now, I don't have enough knowledge of every piece of OSG to edit all the
   entries, but I'd be happy to continue improving the FAQ. I didn't see an
   easy way for structuring, as currently an automatically generated
 overview
   of the questions is used. Any tips there?
  
   Paul
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 

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




-- 
Mike Weiblen -- Austin Texas USA -- http://mew.cx/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to save a RTT texture?

2008-05-07 Thread hesicong2006

Hi everyone,
I have a 3D texture that is attached to a group of cameras, then it 
works OK to render scene to 3D texture. After viewer.run(), in my 
keyboard callback, I save the 3D texture to a dds file. But I got a 
whole blank 3D texture!
I guess if there's some steps must take to read the texture from 
graphics card back to the texture? I also guess to it's the same to save 
a RTT 3D texture as a 2D texture. Does someone have do something like 
this? I need your help, thanks!


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


[osg-users] Compile OSG with Eclipse IDE

2008-05-07 Thread David Jurado
Good morning,
I need help, I am trying to compile OSG, but I can't. My IDE is Eclipse
Platform Version: 3.3.2. When I try to build this project, it show the
following messages:

 Build of configuration Debug for project OSG 

 Internal Builder is used for build   
g++ -IC:\OpenSceneGraph-2.4.0\include -O0 -g3 -Wall -c -fmessage-length=0
-oosgWrappers\osg\NodeCallback.o ..\osgWrappers\osg\NodeCallback.cpp
In file included from
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/variant_cast:19,
 from
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/InstanceCreator:19,
 from
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/Reflector:24,
 from
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReflectionMacros:19,
 from ..\osgWrappers\osg\NodeCallback.cpp:8:
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:66: error: ISO
C++ forbids declaration of `wostream' with no type
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:66: error:
invalid use of `::'
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:66: error:
`wostream' declared as a `virtual' field
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:66: error:
expected `;' before '' token
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:69: error:
expected `;' before virtual
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:69: error: ISO
C++ forbids declaration of `wistream' with no type
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:69: error:
invalid use of `::'
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:69: error:
`wistream' declared as a `virtual' field
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:69: error:
expected `;' before '' token
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:72: error:
expected `;' before virtual
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:121: error:
ISO C++ forbids declaration of `wostream' with no type
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:121: error:
invalid use of `::'
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:121: error:
`wostream' declared as a `virtual' field
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:121: error:
expected `;' before '' token
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:126: error:
expected `;' before virtual
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:126: error:
ISO C++ forbids declaration of `wistream' with no type
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:126: error:
invalid use of `::'
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:126: error:
`wistream' declared as a `virtual' field
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:126: error:
expected `;' before '' token
C:/OpenSceneGraph-2.4.0/include/osgIntrospection/ReaderWriter:132: error:
expected `;' before virtual
Build error occurred, build is stopped


Please, somebody help me.




-- 
Saludos,
David Jurado
Centro de Tecnologías de Información
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgForge: what's the status?

2008-05-07 Thread Robert Osfield
Hi J-S,

On Wed, May 7, 2008 at 5:22 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
  What's the URL? osgforge.org gives me:
  __

  Domain Cloaking Error
  We're sorry, we had a problem with our web panel when you set up cloaking
 for your domain osgforge.org!
  Please go to the DreamHost Web Panel's Domains  Manage Domains area and
 click the [Edit] link next to osgforge.org to re-configure cloaking.

  Error: no domain www.osgforge.org or osgforge.org; if you recently set this
 up, please wait up to one hour.
  __

Argg gotta love Dreamhost...  this used to work...

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


[osg-users] Problem building OpenSceneGraph on CentOS

2008-05-07 Thread Srikanth Bemineni

Hi
I am getting this error while building a plugin.May I know what is this 
CURL plugin can I turn it off ?.We are trying to use Open Scene Graph to 
develop a sesmic processing application.I have a week to prove this has 
the potential to do the things. I have been trying to develop sample 
application in this for past four days but I am not able to get good 
answers or in particular no answer from the community for the problems I 
am facing. This is my third post to  the community and let me see If I 
get a reply.


[ 79%] Built target osgdb_png
Scanning dependencies of target osgdb_tiff
[ 80%] Building CXX object 
src/osgPlugins/tiff/CMakeFiles/osgdb_tiff.dir/ReaderWriterTIFF.o

Linking CXX shared module ../../../lib/osgPlugins-2.4.0/osgdb_tiff.so
[ 80%] Built target osgdb_tiff
Scanning dependencies of target osgdb_curl
[ 80%] Building CXX object 
src/osgPlugins/curl/CMakeFiles/osgdb_curl.dir/ReaderWriterCURL.o
/home/sbemineni/installs/OpenSceneGraph-2.4.0/src/osgPlugins/curl/ReaderWriterCURL.cpp: 
In

  member function `virtual osgDB::ReaderWriter::ReadResult
  ReaderWriterCURL::readFile(ReaderWriterCURL::ObjectType, const 
std::string,

  const osgDB::ReaderWriter::Options*) const':
/home/sbemineni/installs/OpenSceneGraph-2.4.0/src/osgPlugins/curl/ReaderWriterCURL.cpp:226: 
`

  CURLINFO_HTTP_CONNECTCODE' undeclared (first use this function)
/home/sbemineni/installs/OpenSceneGraph-2.4.0/src/osgPlugins/curl/ReaderWriterCURL.cpp:226: 
(Each

  undeclared identifier is reported only once for each function it appears
  in.)
/home/sbemineni/installs/OpenSceneGraph-2.4.0/src/osgPlugins/curl/ReaderWriterCURL.cpp:230: 
`

  CURLINFO_RESPONSE_CODE' undeclared (first use this function)
/home/sbemineni/installs/OpenSceneGraph-2.4.0/src/osgPlugins/curl/ReaderWriterCURL.cpp:275: 
`

  curl_easy_strerror' undeclared (first use this function)
make[2]: *** 
[src/osgPlugins/curl/CMakeFiles/osgdb_curl.dir/ReaderWriterCURL.o] Error 1

make[1]: *** [src/osgPlugins/curl/CMakeFiles/osgdb_curl.dir/all] Error 2
make: *** [all] Error 2

--
With Regards
Srikanth Bemineni
Geotrace Technologies
281-497-8440 extn 228

  

  

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


[osg-users] Filling colors into a Drawn object

2008-05-07 Thread Srikanth Bemineni

Hi,

As requested by Robert, I am splitting my questions into multiple mails.

How do we fill colors in a drawn object.Here I am trying to draw a 
circle and also I want to fill it with yellow  color.



/*/
   //degree to radian conversion
   const float DEG2RAD = 3.14159/180;
   osg::Geode* circle = new osg::Geode;

   osg::Geometry* circleGeom = new osg::Geometry; //circle geometery
   circle-addDrawable( circleGeom );
   osg::Vec3Array* circleArray = new osg::Vec3Array;

   //To calculate circle points
   //here it is every 30 degrees 12 point circle or polygon what ever
   int radius  = 1000;
   for (int i=0; i  360; i = i + 30 )
   {
   float degInRad = i*DEG2RAD;
   circleArray-push_back( 
osg::Vec3(cos(degInRad)*radius,0,sin(degInRad)*radius ) );

   }

   circleGeom-setVertexArray( circleArray );
   
   //attaching the points
   osg::DrawElementsUInt* circleelementobj = new  
osg::DrawElementsUInt( osg::PrimitiveSet::LINE_LOOP, 0 );


   osg::Vec4Array*  ccolors = new osg::Vec4Array;
   osg::TemplateIndexArray unsigned int, 
osg::Array::UIntArrayType,4,4 *colorIndexArray;
   colorIndexArray =new osg::TemplateIndexArrayunsigned int, 
osg::Array::UIntArrayType,4,4;


   osg::Vec2Array* texcoords = new osg::Vec2Array(360/30);

   for( int j=0 ; j  360/30 ; j++ )
   {
   circleelementobj-push_back( j );
   ccolors-push_back(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ); //index 
0 redi
   (*texcoords)[j].set( 40.50f, 40.0f ); //I really didn't get what 
to do just copied from the tutorial

   }

   circleelementobj-push_back( 0 );

   for( int k = 0 ; k  360 /30 ; k++ )
   {
   colorIndexArray-push_back(0);
   }

  
   ccolors-push_back(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ); //index 0 red


   circleGeom-addPrimitiveSet( circleelementobj );

   circleGeom-setColorArray(ccolors);
   circleGeom-setColorIndices(colorIndexArray);
   circleGeom-setColorBinding(osg::Geometry::BIND_PER_VERTEX);
   circleGeom-setTexCoordArray(0, texcoords);

osg::PositionAttitudeTransform* circleXForm =
   new osg::PositionAttitudeTransform();


circleXForm-setPosition(osg::Vec3( 4000 ,0, 4100 ));
root-addChild(circleXForm);
circleXForm-addChild( circle );
  
/*/


--
With Regards
Srikanth Bemineni
Geotrace Technologies
281-497-8440 extn 228

  

  

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


[osg-users] Using OSG NodeKits

2008-05-07 Thread Renan Mendes
Hi, everyone.

I'm new to OSG and would like to know how to use the available nodekits,
specially osgVRPN. I've learned from Mike Weiblen that osgVRPN supports my
SpaceNavigator, an input device, but I don't know what are the necessary
steps for that to work. Can anyone explain to me what to do? Please, don't
feel bad in explaining details that seem rather obvious to you.

Thanks in advance,

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


Re: [osg-users] Filling colors into a Drawn object

2008-05-07 Thread Joakim Simonsson


Hi,


How do we fill colors in a drawn object.Here I am trying to draw a
circle and also I want to fill it with yellow  color.


The only way to fill a circle is to build polygons. One polygon would be  
enough, since the circle shape is convex.


With other words, change the primitive set on this line: (could be  
POLYGON, not sure, check the src)



osg::DrawElementsUInt( osg::PrimitiveSet::LINE_LOOP, 0 );


If you want an edge on your circle, you can use your line loop in addition  
to the poly.


Texture coordinates. Well, they pretty much depend on you texture. If you  
don't use a texture, don't set up the texture array.



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


Re: [osg-users] UFO manipulator

2008-05-07 Thread Bob Huebert

Thanks Robert  welcome back. -bob

On Wed, 7 May 2008, Robert Osfield wrote:


Hi Bob,

osgviewer in 2.x simply doesn't register the UFOManipulator (press 'h'
to get an onscreen listing on manipulators that are registered by
default).   For your own viewers you can add UFOManipilator - just
have a look at the code in osgviewer to see how its done.

Robert.

On Wed, May 7, 2008 at 1:51 AM, Bob Huebert [EMAIL PROTECTED] wrote:

Can anyone say what's up with the UFO manipulator?

 While in osgviewer I should be able to press '5' to select UFO mode. This
doesn't have any effect. Other manipulation modes are fine.

 tia
 -bob
 ___
 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] osgviewerQT shows garbage when viewer is destroyed and re-created

2008-05-07 Thread Mathieu Champlon

Hi Robert,

I quickly hacked the --QOSGWidget mode in order to work around the 
invalid pixel format error (forcing 
traits-setInheritedWindowPixelFormat = true;) and the result is the 
same : trashed scene on the second run.
I tried adding the piece of code you suggested but it does not change 
anything.


By the way the crash you were experiencing running with --QOSGWidget is 
actually due to osg::ArgumentParser modifying argv, thus on the second 
run argc remains unchanged but all arguments have actually been eaten up 
from argv.

I am now using this code to run the application twice :
int main( int argc, char **argv )
{
   char** tmp = (char**)malloc( argc * sizeof( char*) );
   memcpy( tmp, argv, argc * sizeof( char* ) );
   run( argc, argv );
   run( argc, tmp );
}

MAT.


Robert Osfield wrote:

Hi Mathieu,

The error with -QOSGWidget looks to be a bug in this code, but its a
totally different path that the default path which uses
GraphicsWindowEmbedded to adapt the Viewer.  QOSGWidget is the most
flexible path for integration and long term I'd like this to be the
default route under Qt.  My own time is rather stretched out so I
can't address all these things at once.

The issues you are seeing with the default path is very unlikely to be
related to transparency, most likely is issues with display lists or
texture objects being reused inappropriately.  In theory the viewer
should be release OpenGL objects when the context is destroyed, but
with GraphicsWindowEmbedded not all the standard functionality for
managing OpenGL objects is available, so perhaps this step is not
being executed appropriately.

One thing you could try is a

viewer-getSceneData()-releaseGLObjects();
osg::GLObjects::discardAllDeletedGLObjects(0);

In between the viewer allocations.

Robert.
  



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


[osg-users] How I build OSG on WinXP (WAS Freetype plugin doesn't appear in project list)

2008-05-07 Thread Mike Weiblen
Hi,
as a datapoint, here is my recipe for building OSG 2.4.0 on
VS2005sp1/WinXPsp2 that I use for the win32 binary installer.
Motivated by my own dreadful memory, my goal is to make the whole
process as foolproof and turnkey as possible...

1) svn checkout
https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/osgbuilds/tags/osg2.4.0_vs80sp1_setup_2008-04-28
(or trunk if you want my raw development)
That is my SVN build configuration that points to all the necessary
components via svn:external references to other project's tags.  If
you were to checkout using the --ignore-externals flags, you'd see
that tree is actually only ~98KB, thanks to the magic of svn:external.
 But when checked-out with externals enabled, all the subsystems get
pulled into the correct locations relative to each other.  (fyi, this
is why I really like using SVN to distribute the 3rdParty prebuilts,
rather than having to coordinate the unpacking of .zip snapshots.
Once you embrace svn:external, .zip snapshots are just a pain :-)

2) edit SETENV.bat to your liking
You should review and decide if/what needs adjusting.  Note that
Release v. Debug is specified here.

3) run x1000_CMAKE.bat
That sets my preference overrides for some CMake defaults then runs
CMake (in non-GUI mode) to create the VS projects.  You should review
and decide if/what needs adjusting.

4) run x3000_VSIDE.bat
That launches VisualStudio 2005, with the OSG envars initialized for
ease of debugging, using the just-generated project files.

5) build as usual.

Following these steps, I get no errors or significant warnings.  Any
tweaks are preserved in the three .bat scripts mentioned.  My goal is
(and in my experience) it Just Works.

cheers
-- mew

PS Yep, I will capture this is a README

-- 
Mike Weiblen -- Austin Texas USA -- http://mew.cx/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Strange polygon flickering

2008-05-07 Thread Brian
Hi,

I have a scene that contains a large terrain database and some vehicles.  The 
scene is being viewed from a very high altitude using very small horizontal and 
vertical FOVs so that the camera is zoomed in on the truck.  I've noticed that 
if I have the truck pictured in the attachment so that its wheels are on the 
terrain, I get a strange flickering of polygons (imagine going back and forth 
between images truck1.jpg and truck2.jpg.)  If I raise the truck about 5 meters 
off the ground, then the flickering goes away.  However, having a truck float 
five meters off the ground isn't terribly realistic.

Any clues as to what is going on?

Thanks,
Brian
inline: truck2.jpginline: truck1.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  1   2   >