Re: [osg-users] Stereoscopic Screenshot

2010-02-01 Thread Nathan Schofield
Sorry I don't know why I said shutter glasses, we are using a horizontal 
interlaced monitor with passive polarized glasses, although I guess I still 
wont be able to capture the effect anyway. If anyone knows of a way of doing 
what I need I would be very thankful.

Cheers,
Nathan

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





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


Re: [osg-users] quicktime plugin fails to compile on OS X 10.5

2010-02-01 Thread Ulrich Hertlein
Hi Stephan,

On 30/01/10 19:30 , Stephan Huber wrote:
 Am 30.01.10 04:38, schrieb Ulrich Hertlein:
 I'm not too familiar with QT/QD anyhow so I thought I'd flag it here instead.
 
 It seems, that the last submission for the quicktime plugin was tested
 only on windows.
 
 can you try to replace the offending line from
 
 Rect bounds = (*GetMovieBoundsRgn(_movie))-rgnBBox;
 
 to
 
 Rect bounds;
 GetRegionBounds(GetMovieBoundsRgn(_movie), bounds);

I can confirm that that compiles and runs fine.
Does that need to be #ifdef'd for OS X or should that work cross platform?

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


Re: [osg-users] quicktime plugin fails to compile on OS X 10.5

2010-02-01 Thread Serge Lages
Hi Guys,

Sorry for this one, I'll try on windows if GetRegionBounds works and
resubmit a patch.

Cheers,

On Mon, Feb 1, 2010 at 9:37 AM, Ulrich Hertlein u.hertl...@sandbox.dewrote:

 Hi Stephan,

 On 30/01/10 19:30 , Stephan Huber wrote:
  Am 30.01.10 04:38, schrieb Ulrich Hertlein:
  I'm not too familiar with QT/QD anyhow so I thought I'd flag it here
 instead.
 
  It seems, that the last submission for the quicktime plugin was tested
  only on windows.
 
  can you try to replace the offending line from
 
  Rect bounds = (*GetMovieBoundsRgn(_movie))-rgnBBox;
 
  to
 
  Rect bounds;
  GetRegionBounds(GetMovieBoundsRgn(_movie), bounds);

 I can confirm that that compiles and runs fine.
 Does that need to be #ifdef'd for OS X or should that work cross platform?

 Cheers,
 /ulrich
 ___
 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] locking nodes

2010-02-01 Thread Robert Osfield
Hi Rabbi,

The OSG doesn't provide such a mechanism, and in the case of scene
graph it wouldn't be a case of locking a node and they do the
operation, you have to lock the whole scene graph and then do your
operation.  The need to lock the whole scene graph is that traversals
like the cull and draw traversal have the scene graph is a single
consistent state during their whole operation, otherwise you'd end up
with a tangled mess of state.

To enable multithreading like you are looking for some scene graphs
have gone the route of buffering the scene graph so that the update
phase works on one copy, while the reading phases (cull and draw) read
from another, then the data is synchronized each frame to make sure
the buffers are all consistent.  This approach is expensive design,
implementation and performance wise so if you can avoid it then you
typically can have a more efficient and flexible scene graph.

The way to handle multi-threaded update with the scene graph would be
to either lock the scene graph access at high level - during the
dispatch of the various phases of the frame loop, or to implement a
command operation scheme where you place operations on the scene graph
into a thread safe queue and then read and apply the operations during
the update phase of the scene graph.

Robert.

On Mon, Feb 1, 2010 at 4:36 AM, Rabbi Robinson longa...@gmail.com wrote:
 Hi,

 I have a multithread application which might update an node (add/remove 
 children etc) at the same time. Is there any locking mechanism for ensuring 
 only one thread is in a critical session at any time.

 I look at the source code of Group which just use std::vector for children 
 list. As far as I know, std::vector is not safe for multiple write.

 I also noticed there is a mutex for reference count, which does not protected 
 the object itself.

 Thank you!

 Cheers,
 Rabbi

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





 ___
 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] need testers

2010-02-01 Thread Linares Antonin
Hi

On Quadro NVS 295, RHEL 5
run but seems wrong:

glLinkProgram microshader FAILED
Program microshader infolog:
Vertex info
---
Internal error: assembly compile error for vertex shader at offset
23415:
-- error message --
line 617, column 1:  error: too many result variable components written
-- internal assembly text --



Le samedi 30 janvier 2010 à 14:34 +0200, Trajce Nikolov a écrit :
 Hi Urlich,
 
 
 thanks for your time and the will for doing the test. Looks like this
 code is not working well on older boards .. I really appreciate the
 feedback ... Thanks again
 
 Nick
 
 http://www.linkedin.com/in/tnick
 
 
 On Sat, Jan 30, 2010 at 5:05 AM, Ulrich Hertlein
 u.hertl...@sandbox.de wrote:
 Hi Nick,
 
 On 30/01/10 4:49 , Trajce Nikolov wrote:
  can some of you find a minute or two to just run the
 attached source (it
  is based on the #define NUM_LIGHTS) on the hardware you have
 and see if
  it runs, and if so just let me know what is the OS and the
 hardware?
 
 
 I'm getting these runtime errors on OS X 10.5, GeForce 8600M
 GT:
 
 $ ./nicktest
 glLinkProgram microshader FAILED
 Program microshader infolog:
 ERROR: Implementation limit of 40 varying components exceeded,
 linked shaders use 24 too
 many varying component(s).
 
 Warning: detected OpenGL error 'invalid operation' at After
 Renderer::compile
 MAX TEXTURE UNITS16
 GraphicsWindowCarbon: VSync=on
 
 Cheers,
 /ulrich
 
 ___
 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] need testers

2010-02-01 Thread Trajce Nikolov
Thanks Linares !

Nick

http://www.linkedin.com/in/tnick


On Mon, Feb 1, 2010 at 12:08 PM, Linares Antonin
antonin.lina...@onera.frwrote:

 Hi

 On Quadro NVS 295, RHEL 5
 run but seems wrong:

 glLinkProgram microshader FAILED
 Program microshader infolog:
 Vertex info
 ---
 Internal error: assembly compile error for vertex shader at offset
 23415:
 -- error message --
 line 617, column 1:  error: too many result variable components written
 -- internal assembly text --



 Le samedi 30 janvier 2010 à 14:34 +0200, Trajce Nikolov a écrit :
  Hi Urlich,
 
 
  thanks for your time and the will for doing the test. Looks like this
  code is not working well on older boards .. I really appreciate the
  feedback ... Thanks again
 
  Nick
 
  http://www.linkedin.com/in/tnick
 
 
  On Sat, Jan 30, 2010 at 5:05 AM, Ulrich Hertlein
  u.hertl...@sandbox.de wrote:
  Hi Nick,
 
  On 30/01/10 4:49 , Trajce Nikolov wrote:
   can some of you find a minute or two to just run the
  attached source (it
   is based on the #define NUM_LIGHTS) on the hardware you have
  and see if
   it runs, and if so just let me know what is the OS and the
  hardware?
 
 
  I'm getting these runtime errors on OS X 10.5, GeForce 8600M
  GT:
 
  $ ./nicktest
  glLinkProgram microshader FAILED
  Program microshader infolog:
  ERROR: Implementation limit of 40 varying components exceeded,
  linked shaders use 24 too
  many varying component(s).
 
  Warning: detected OpenGL error 'invalid operation' at After
  Renderer::compile
  MAX TEXTURE UNITS16
  GraphicsWindowCarbon: VSync=on
 
  Cheers,
  /ulrich
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

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


Re: [osg-users] quicktime plugin fails to compile on OS X 10.5

2010-02-01 Thread Serge Lages
Hi,

Here is the corrected patch with a #ifdef to compile on all platforms.

Cheers,

On Mon, Feb 1, 2010 at 10:01 AM, Serge Lages serge.la...@gmail.com wrote:

 Hi Guys,

 Sorry for this one, I'll try on windows if GetRegionBounds works and
 resubmit a patch.

 Cheers,

 On Mon, Feb 1, 2010 at 9:37 AM, Ulrich Hertlein u.hertl...@sandbox.dewrote:

 Hi Stephan,

 On 30/01/10 19:30 , Stephan Huber wrote:
  Am 30.01.10 04:38, schrieb Ulrich Hertlein:
  I'm not too familiar with QT/QD anyhow so I thought I'd flag it here
 instead.
 
  It seems, that the last submission for the quicktime plugin was tested
  only on windows.
 
  can you try to replace the offending line from
 
  Rect bounds = (*GetMovieBoundsRgn(_movie))-rgnBBox;
 
  to
 
  Rect bounds;
  GetRegionBounds(GetMovieBoundsRgn(_movie), bounds);

 I can confirm that that compiles and runs fine.
 Does that need to be #ifdef'd for OS X or should that work cross platform?

 Cheers,
 /ulrich
 ___
 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




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


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


Re: [osg-users] linking error when i use osgdb_dae

2010-02-01 Thread René Molenaar
Just for the record:

If this occurs, you did not link the collada plugin to the correct boost
libs.

1. go to your osg build dir
2. run ccmake or cmake-gui
3. check: COLLADA_BOOST_FILESYSTEM_LIBRARY and COLLADA_BOOST_SYSTEM_LIBRARY
4. make sure they point to the correct boost libs (not the mingw libs
provided by the collada libs) (if you don't have these libs, install them)
5. recompile

p.s. this error only surfaces at run-time, not at the configure or build
time..

Now i have a question.
I was playing with the plugin and was wondering:
If I use osgconv to write a .dae file, what happens to the (embedded)
textures. Can they be embedded in the dae file or written out separately by
the writer?

René


2009/9/18 Martin Großer grosser.mar...@gmx.de

 Hello,

 a new day and a new problem. I would like try to load a dae-File. I install
 the collada-dom like the description on the osg website.
 After this I build osg new. But when I start the osgviewer with the collada
 file I get the following message:

 Warning: dynamic library
 '/home/grosser/OpenSceneGraph-2.8.2/install/lib64/osgPlugins-2.8.2/osgdb_dae.so'
 exists, but an error occurred while trying to open it:
 /usr/local/lib/libcollada14dom.so: undefined symbol:
 _ZN5boost6system19get_system_categoryEv
 Warning: Could not find plugin to read objects from file cube.dae.
 osgviewer: No data loaded

 The boost libs are in /usr/lib64 and the collada libs are in
 /usr/local/lib.

 My LD_LIBRARY_PATH is:


 LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib:/home/grosser/OpenSceneGraph-2.8.2/install/lib64

 What is my mistake?

 Cheers,

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

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


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Martin Scheffler
It seems that OGR is unable to find the ESRI driver.
[code]
OGRGetDriverByName( ESRI  Shapefile);
[/code]
returns NULL. This is not checked and causes a crash.

I am using FWTools 2.4.6. I have copied the DLLS in the FWTools bin directory 
to a location in my path. Do you have an idea what I do wrong?

Thank you!

Cheers,
Martin[/code]

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





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


Re: [osg-users] quicktime plugin fails to compile on OS X 10.5

2010-02-01 Thread Robert Osfield
Thanks Serge, fix now merged and submitted to svn/trunk.  One thing
that does make me wonder is whether the Windows and OSX paths will now
behave differently.  Is there any chance that this might happen?

On Mon, Feb 1, 2010 at 9:18 AM, Serge Lages serge.la...@gmail.com wrote:
 Hi,
 Here is the corrected patch with a #ifdef to compile on all platforms.
 Cheers,

 On Mon, Feb 1, 2010 at 10:01 AM, Serge Lages serge.la...@gmail.com wrote:

 Hi Guys,
 Sorry for this one, I'll try on windows if GetRegionBounds works and
 resubmit a patch.
 Cheers,

 On Mon, Feb 1, 2010 at 9:37 AM, Ulrich Hertlein u.hertl...@sandbox.de
 wrote:

 Hi Stephan,

 On 30/01/10 19:30 , Stephan Huber wrote:
  Am 30.01.10 04:38, schrieb Ulrich Hertlein:
  I'm not too familiar with QT/QD anyhow so I thought I'd flag it here
  instead.
 
  It seems, that the last submission for the quicktime plugin was tested
  only on windows.
 
  can you try to replace the offending line from
 
  Rect bounds = (*GetMovieBoundsRgn(_movie))-rgnBBox;
 
  to
 
  Rect bounds;
  GetRegionBounds(GetMovieBoundsRgn(_movie), bounds);

 I can confirm that that compiles and runs fine.
 Does that need to be #ifdef'd for OS X or should that work cross
 platform?

 Cheers,
 /ulrich
 ___
 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



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

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


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


[osg-users] Lets slowly update extension gl symbols to latest OpenGL specification with each submission.

2010-02-01 Thread Wojciech Lewandowski
Hi Everyone,

Lots of older OpenGL extensions are now included in OpenGL specification (rel. 
3.2). I'd like to propose a small cleaning movement of OSG sources
 
Every time we submit a change of some OSG file we could also check for obsolete 
GL extension:  EXT, ARB, NV, ATI etc symbols and replace them with most current 
OpenGL names.

Idea is to take it easy and slow. Lets change only these header and source 
files which would get submitted anyways. Changing and submitting all OSG source 
at once could easily swamp Robert.

Cheers,
Wojtek Lewandowski


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


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Martin Scheffler
OK, got it working now. The problem was I did not set the working directory to 
osgEarth/bin. This caused the relative paths in the .earth file to be incorrect.
createFeatureProfile() in FeatureSourceOGR returned NULL because the file could 
not be loaded. This was not checked in 
FeatureModelSource::gridAndRenderFeaturesForStyle line 195:
[code]
FeatureGridder gridder( extent.bounds(), _gridding.get() );
[/code]
Causing the crash.

Feature overlay works perfect now!

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





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


[osg-users] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread René Molenaar
Hello osg-users,

I noticed that the latest developers release (2.9.6) translates quads to
triangles.
Very large models need to be chopped into smaller pieces for this
translation to work,
but in most cases it goes unnoticed.. until, you switch to wireframe.
Now we see the triangles. For example:

boxGeode-addDrawable(new osg::ShapeDrawable(new osg::Box(center, lx, ly,
lz)));

now renders triangles instead of quads ..

Is there an easy way to render the wireframe mode 'as-if' quads are used?

cheers,

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


Re: [osg-users] Lets slowly update extension gl symbols to latestOpenGL specification with each submission.

2010-02-01 Thread Tomlinson, Gordon
Would these only be obsolete if your using Opengl 3.2 ?
 
What about when I'm on a machine and graphics card that only supports
say OpenGL 2.1,  
 
this is a very common case for us were users are in very controlled
environments and running on older equipment that is unlikely to get
upgraded or new drivers etc.
 
Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems
 



From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Wojciech Lewandowski
Sent: Monday, February 01, 2010 6:24 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Lets slowly update extension gl symbols to
latestOpenGL specification with each submission.


Hi Everyone,
 
Lots of older OpenGL extensions are now included in OpenGL specification
(rel. 3.2). I'd like to propose a small cleaning movement of OSG sources
 
Every time we submit a change of some OSG file we could also check for
obsolete GL extension:  EXT, ARB, NV, ATI etc symbols and replace them
with most current OpenGL names.
 
Idea is to take it easy and slow. Lets change only these header and
source files which would get submitted anyways. Changing and submitting
all OSG source at once could easily swamp Robert.
 
Cheers,
Wojtek Lewandowski
 
 
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread Paul Martz

René Molenaar wrote:
I noticed that the latest developers release (2.9.6) translates quads to 
triangles.
Very large models need to be chopped into smaller pieces for this 
translation to work,

but in most cases it goes unnoticed.. until, you switch to wireframe.
Now we see the triangles. For example:

boxGeode-addDrawable(new osg::ShapeDrawable(new osg::Box(center, lx, 
ly, lz)));


now renders triangles instead of quads ..

Is there an easy way to render the wireframe mode 'as-if' quads are used?


You could make a wireframe box using GL_LINE_LOOP and GL_LINE_STRIP 
primitives. osgWorks (osgworks.googlecode.com) has a convenience routine 
for this; see osgwTools/Shapes.cpp/.h.

   -Paul



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


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Jason Beverage
Glad to hear you got it working!

Jason

On Mon, Feb 1, 2010 at 7:20 AM, Martin Scheffler osgfo...@tevs.eu wrote:
 OK, got it working now. The problem was I did not set the working directory 
 to osgEarth/bin. This caused the relative paths in the .earth file to be 
 incorrect.
 createFeatureProfile() in FeatureSourceOGR returned NULL because the file 
 could not be loaded. This was not checked in 
 FeatureModelSource::gridAndRenderFeaturesForStyle line 195:
 [code]
 FeatureGridder gridder( extent.bounds(), _gridding.get() );
 [/code]
 Causing the crash.

 Feature overlay works perfect now!

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





 ___
 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] Rendering 2 video stream

2010-02-01 Thread Adrian Egli OpenSceneGraph (3D)
Hello all,

i am looking for a library or idea how we could render osg into a video
stream?

/adrian

-- 

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


Re: [osg-users] Lets slowly update extension gl symbols tolatestOpenGL specification with each submission.

2010-02-01 Thread Wojciech Lewandowski
Hi Gordon,

What about when I'm on a machine and graphics card that only supports say 
OpenGL 2.1,  

I guess this is an argument for reverse approach ie  to use common denominator 
and use extension versions in their earliest forms 
It is a valid point, I must admit I have not thought about it. Maybe chnging 
_EXT, _ARB  to non suffix versions is not such a good idea after all. Maybe it 
was too early to come up with this proposal... 

Wojtek


- Original Message - 
  From: Tomlinson, Gordon 
  To: OpenSceneGraph Users 
  Sent: Monday, February 01, 2010 2:47 PM
  Subject: Re: [osg-users] Lets slowly update extension gl symbols 
tolatestOpenGL specification with each submission.


  Would these only be obsolete if your using Opengl 3.2 ?

  What about when I'm on a machine and graphics card that only supports say 
OpenGL 2.1,  

  this is a very common case for us were users are in very controlled 
environments and running on older equipment that is unlikely to get upgraded or 
new drivers etc.

  Gordon Tomlinson
  Product Manager 3d Technology  Future Products
  Overwatch®
  An Operating Unit of Textron Systems




--
  From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wojciech 
Lewandowski
  Sent: Monday, February 01, 2010 6:24 AM
  To: osg-users@lists.openscenegraph.org
  Subject: [osg-users] Lets slowly update extension gl symbols to latestOpenGL 
specification with each submission.


  Hi Everyone,

  Lots of older OpenGL extensions are now included in OpenGL specification 
(rel. 3.2). I'd like to propose a small cleaning movement of OSG sources

  Every time we submit a change of some OSG file we could also check for 
obsolete GL extension:  EXT, ARB, NV, ATI etc symbols and replace them with 
most current OpenGL names.

  Idea is to take it easy and slow. Lets change only these header and source 
files which would get submitted anyways. Changing and submitting all OSG source 
at once could easily swamp Robert.

  Cheers,
  Wojtek Lewandowski





--


  ___
  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] Lets slowly update extension gl symbolstolatestOpenGL specification with each submission.

2010-02-01 Thread Tomlinson, Gordon
Nothing against the proposal, simplification and clean up is good ...
 
I just know I fall into the situation where large groups of my end users
will be on what we thinks of as very old cards ( and where they cannot
update or update easily ) and my paranoia then takes me down the road of
oh heck  :)
 
 
Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems
 



From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Wojciech Lewandowski
Sent: Monday, February 01, 2010 10:24 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lets slowly update extension gl
symbolstolatestOpenGL specification with each submission.


Hi Gordon,
 
What about when I'm on a machine and graphics card that only supports
say OpenGL 2.1,  
 
I guess this is an argument for reverse approach ie  to use common
denominator and use extension versions in their earliest forms 
It is a valid point, I must admit I have not thought about it. Maybe
chnging _EXT, _ARB  to non suffix versions is not such a good idea after
all. Maybe it was too early to come up with this proposal... 
 
Wojtek
 
 
- Original Message - 

From: Tomlinson, Gordon
mailto:gtomlin...@overwatch.textron.com  
To: OpenSceneGraph Users
mailto:osg-users@lists.openscenegraph.org  
Sent: Monday, February 01, 2010 2:47 PM
Subject: Re: [osg-users] Lets slowly update extension gl symbols
tolatestOpenGL specification with each submission.


Would these only be obsolete if your using Opengl 3.2 ?
 
What about when I'm on a machine and graphics card that only
supports say OpenGL 2.1,  
 
this is a very common case for us were users are in very
controlled environments and running on older equipment that is unlikely
to get upgraded or new drivers etc.
 
Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)

An Operating Unit of Textron Systems
 



From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Wojciech Lewandowski
Sent: Monday, February 01, 2010 6:24 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Lets slowly update extension gl symbols to
latestOpenGL specification with each submission.


Hi Everyone,
 
Lots of older OpenGL extensions are now included in OpenGL
specification (rel. 3.2). I'd like to propose a small cleaning movement
of OSG sources
 
Every time we submit a change of some OSG file we could also
check for obsolete GL extension:  EXT, ARB, NV, ATI etc symbols and
replace them with most current OpenGL names.
 
Idea is to take it easy and slow. Lets change only these header
and source files which would get submitted anyways. Changing and
submitting all OSG source at once could easily swamp Robert.
 
Cheers,
Wojtek Lewandowski
 
 
 







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

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


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


Re: [osg-users] Lets slowly update extension glsymbolstolatestOpenGL specification with each submission.

2010-02-01 Thread Wojciech Lewandowski
The longer I think of it the more I agree with your earlier post. I realized we 
could start such extension cleanning but only if OSG had defined bottom line 
requiremnt for OGL version. As long as its not clealy defined, such clean up 
practice may be more problematic than frutiful. 

Wojtek

- Original Message - 
  From: Tomlinson, Gordon 
  To: OpenSceneGraph Users 
  Sent: Monday, February 01, 2010 4:30 PM
  Subject: Re: [osg-users] Lets slowly update extension glsymbolstolatestOpenGL 
specification with each submission.


  Nothing against the proposal, simplification and clean up is good ...

  I just know I fall into the situation where large groups of my end users will 
be on what we thinks of as very old cards ( and where they cannot update or 
update easily ) and my paranoia then takes me down the road of oh heck  :)


  Gordon Tomlinson
  Product Manager 3d Technology  Future Products
  Overwatch®
  An Operating Unit of Textron Systems




--
  From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wojciech 
Lewandowski
  Sent: Monday, February 01, 2010 10:24 AM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] Lets slowly update extension gl 
symbolstolatestOpenGL specification with each submission.


  Hi Gordon,

  What about when I'm on a machine and graphics card that only supports say 
OpenGL 2.1,  

  I guess this is an argument for reverse approach ie  to use common 
denominator and use extension versions in their earliest forms 
  It is a valid point, I must admit I have not thought about it. Maybe chnging 
_EXT, _ARB  to non suffix versions is not such a good idea after all. Maybe it 
was too early to come up with this proposal... 

  Wojtek


  - Original Message - 
From: Tomlinson, Gordon 
To: OpenSceneGraph Users 
Sent: Monday, February 01, 2010 2:47 PM
Subject: Re: [osg-users] Lets slowly update extension gl symbols 
tolatestOpenGL specification with each submission.


Would these only be obsolete if your using Opengl 3.2 ?

What about when I'm on a machine and graphics card that only supports say 
OpenGL 2.1,  

this is a very common case for us were users are in very controlled 
environments and running on older equipment that is unlikely to get upgraded or 
new drivers etc.

Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch®
An Operating Unit of Textron Systems





From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wojciech 
Lewandowski
Sent: Monday, February 01, 2010 6:24 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Lets slowly update extension gl symbols to 
latestOpenGL specification with each submission.


Hi Everyone,

Lots of older OpenGL extensions are now included in OpenGL specification 
(rel. 3.2). I'd like to propose a small cleaning movement of OSG sources

Every time we submit a change of some OSG file we could also check for 
obsolete GL extension:  EXT, ARB, NV, ATI etc symbols and replace them with 
most current OpenGL names.

Idea is to take it easy and slow. Lets change only these header and source 
files which would get submitted anyways. Changing and submitting all OSG source 
at once could easily swamp Robert.

Cheers,
Wojtek Lewandowski








___
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] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Glenn Waldron
Thanks Martin; I've opened a ticket to install better error checking in this
scenario. http://www.osgearth.org/ticket/100

http://www.osgearth.org/ticket/100
Glenn Waldron : Pelican Mapping : +1.703.652.4791


On Mon, Feb 1, 2010 at 7:20 AM, Martin Scheffler osgfo...@tevs.eu wrote:

 OK, got it working now. The problem was I did not set the working directory
 to osgEarth/bin. This caused the relative paths in the .earth file to be
 incorrect.
 createFeatureProfile() in FeatureSourceOGR returned NULL because the file
 could not be loaded. This was not checked in
 FeatureModelSource::gridAndRenderFeaturesForStyle line 195:
 [code]
 FeatureGridder gridder( extent.bounds(), _gridding.get() );
 [/code]
 Causing the crash.

 Feature overlay works perfect now!

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





 ___
 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] Looking for professional OSG consultant

2010-02-01 Thread Martin Beckett
modjtabaf did some useful improvements to the spherical manipualtor - you could 
contact him.

Alternatively if this is a requirement that might have general usefulness you 
could post the requirements here and see if anyone is  (or would be interested 
in) working on it anyway.

Cheers,
Martin

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





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


Re: [osg-users] Stereoscopic Screenshot

2010-02-01 Thread David Fries
On Mon, Feb 01, 2010 at 08:33:00AM +, Nathan Schofield wrote:
 Sorry I don't know why I said shutter glasses, we are using a
 horizontal interlaced monitor with passive polarized glasses,
 although I guess I still wont be able to capture the effect anyway.
 If anyone knows of a way of doing what I need I would be very
 thankful.

If it's just the old style CRT interlaced format, as in left eye sees
even lines and right eye sees odd lines, then you would only need a
static image.  If that's the case, capture left and right images, then
use a program to take even lines from one and odd from the other.  The
gimp has a program to blank every other line, if you do that do you
get black on one eye and the image in the other?

If it's the entire frame buffer being displayed to the left eye in
one frame, and the next goes to the right, you have to have a program
capable of switching out left and right images with the quad buffering
anyway, so why don't you just draw it real time with your program in
the first place?  The other option is to capture left and right images
to disk, then have an option in your program to load them back off
disk and display them again.

-- 
David Fries da...@fries.net
http://fries.net/~david/ (PGP encryption key available)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread René Molenaar
Thanks Paul,

It seems to me that I would need a similar convenience routine that creates
GL_LINE_... primitives for arbitrary geometry.
The thing is a lot of fe-models still use quads, end-users expect to see
quads for their fe-models.

René


2010/2/1 Paul Martz pma...@skew-matrix.com

 René Molenaar wrote:

 I noticed that the latest developers release (2.9.6) translates quads to
 triangles.
 Very large models need to be chopped into smaller pieces for this
 translation to work,
 but in most cases it goes unnoticed.. until, you switch to wireframe.
 Now we see the triangles. For example:

 boxGeode-addDrawable(new osg::ShapeDrawable(new osg::Box(center, lx, ly,
 lz)));

 now renders triangles instead of quads ..

 Is there an easy way to render the wireframe mode 'as-if' quads are used?


 You could make a wireframe box using GL_LINE_LOOP and GL_LINE_STRIP
 primitives. osgWorks (osgworks.googlecode.com) has a convenience routine
 for this; see osgwTools/Shapes.cpp/.h.
   -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] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread Paul Martz

René Molenaar wrote:

Thanks Paul,

It seems to me that I would need a similar convenience routine that 
creates GL_LINE_... primitives for arbitrary geometry.
The thing is a lot of fe-models still use quads, end-users expect to see 
quads for their fe-models.


In general, then, I'd advise you to stick to GL1/2 and use GL_QUADS 
PrimitiveSets in Geometry-type Drawables, and GL_LINE polygon mode.


Or, knowing that all modern graphics hardware draws a quad as two 
triangles, the other way to handle this would be to keep two 
representations of your model, one for fill, and one for line. They 
could easily share the same vertex data, so this should not consume a 
substantial amount of resources.


So you have many options available to you.
   -Paul

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


Re: [osg-users] locking nodes

2010-02-01 Thread Rabbi Robinson
Hi,

Thanks, that helps alot. That kinda explain why in OpenSG you have lock each 
single update operation. I thought OSG handles that internally, but looks like 
its going to be more complicated than that.

I guess I will try to avoid multithread in this case and just have one single 
thread responsible for all the updating, at the cost of possibly lower 
performance.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] CGFX

2010-02-01 Thread Rabbi Robinson
Hi,

What is the status on CGFX? Last post on this topic was back in 2008.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] SetPixelFormat failure with Win XP and Nvidia

2010-02-01 Thread Robin Ledig

Hi,

I got a complex implementation which should work platform independent.
My problem is that I get an unknown Pixelformat error ( Windows error 
[2000] ) when I try to set the Pixel format with Qt.
I have already had a look at Don Leich's implementation which works on 
the same configuration but I'm unable to determine the difference.

It's Win xp with an nvidia graphics card.
With debugging I found that my implementation choices the same pixel 
format as Don's but still gets the error.
I also found other's who had the same problem with google or here in the 
mailing list but I couldn't find a concrete answer.

I would appreciate any help and would post some code snippets if necessary.

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


Re: [osg-users] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread René Molenaar
Thank you,

I will experiment with the latter option (as the first one is currently
already working with osg 2.8.2).

I bet this question will be repeated in the future.. ;-)

cheers,

René

2010/2/1 Paul Martz pma...@skew-matrix.com

 René Molenaar wrote:

 Thanks Paul,

 It seems to me that I would need a similar convenience routine that
 creates GL_LINE_... primitives for arbitrary geometry.
 The thing is a lot of fe-models still use quads, end-users expect to see
 quads for their fe-models.


 In general, then, I'd advise you to stick to GL1/2 and use GL_QUADS
 PrimitiveSets in Geometry-type Drawables, and GL_LINE polygon mode.

 Or, knowing that all modern graphics hardware draws a quad as two
 triangles, the other way to handle this would be to keep two representations
 of your model, one for fill, and one for line. They could easily share the
 same vertex data, so this should not consume a substantial amount of
 resources.

 So you have many options available to you.

   -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] Possible performance issue with FLATTEN_STATIC_TRANSFORMS

2010-02-01 Thread Paul Martz
Hi all -- I wanted to alert everyone to a possible performance issue 
with the FLATTEN_STATIC_TRANSFORMS flag in osgUtil::Optimizer. As this 
flag is set by default, it could affect anyone who uses the Optimizer. 
However, the problem is limited to instances of static Transform nodes, 
or in other words, static Transform nodes that have multiple parents.


The issue is being discussed in two other threads, but the subjects are 
a bit obtuse, so I wanted to bring it to everyone's attention in this 
separate thread. The other discussion threads to check are:

  osg-users: mergeGeodes crash
  osg-submissions: Optimizer fix for FSTV
The attached test model in mergeGeodes crash demonstrate the issue, 
and the stats display in osgviewer plainly shows the problem.


Summary of the issue: FLATTEN_STATIC_TRANSFORMS replaces static 
Transform nodes with Group nodes. To do this, it adds all the children 
of the Transform node to the new Group. However, if the transform has 
multiple parents, children are added redundantly to the Group, causing 
them to appear as children multiple times incorrectly.


Example: Suppose you have a static Transform with two parents, and one 
child called NodeA. The FLATTEN_STATIC_TRANSFORMS operation will add a 
new Group to each of the parents (which is correct), but the new Group 
will end up with _two_ children, both are references to the same NodeA. 
The result is that NodeA, which should be instanced twice, is now 
instanced four times, and therefore visited four times by the cull 
traversal. Drawable children of NodeA will be drawn four times instead 
of twice.


Note that this addition of redundant nodes issue has been present since 
svn revision 115 back in 2001. This problem has been with us for a long 
long time.


This may or may not be a performance impact. In testing I've done with a 
few models that I know use instancing/multiparenting of Transforms, the 
additional cost of the redundant node processing seems to be outweighed 
by the fact that FLATTEN_STATIC_TRANSFORMS combined with 
REMOVE_REDUNDANT_NODES produces a significant net reduction in the cull 
traversal. But this will vary from one model to the next, and will 
depend on things like how deeply nested your scene graph is, and more 
importantly how many times (if at all) your scene graph uses instances 
of Transform nodes.


The point of this post is to bring it to your attention so that you can 
do your own benchmarking and make your own determination on a course of 
action.


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

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


Re: [osg-users] quads deprecated, resulting in triangles in wireframe mode

2010-02-01 Thread Paul Martz

René Molenaar wrote:

I bet this question will be repeated in the future.. ;-)


Probably. The issue you encountered is why I wrote the makeWireBox() 
function in osgWorks. :-)

   -Paul

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


Re: [osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-02-01 Thread Roman Grigoriev
Hi,J.P.

suggested code don't works on OSG SVN geforce8600M GT
if I copy in the loop all works fine 

so this code doesn't work

//Transmittance
data = new float[256*64*3];
f = fopen(data/transmittance.raw, rb);
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);

Transmittance_t = new osg::Texture2D;
Transmittance_t-setSourceFormat(GL_RGBA);
Transmittance_t-setSourceType(GL_FLOAT);

Transmittance_t-setFilter(osg::Texture2D::MIN_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setFilter(osg::Texture2D::MAG_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setWrap(osg::Texture2D::WRAP_T, 
osg::Texture2D::CLAMP_TO_EDGE);
Transmittance_t-setWrap(osg::Texture2D::WRAP_S, 
osg::Texture2D::CLAMP_TO_EDGE);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance-setImage(256,64,1, GL_RGB, GL_RGB32F_ARB, 
GL_FLOAT,(unsigned char*)data, osg::Image::NO_DELETE); 
Transmittance_t-setImage(image_Transmittance);
delete[] data;

and this code works fine

//Transmittance
data = new float[256*64*3];
f = fopen(data/transmittance.raw, rb);
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);
Transmittance_t = new osg::Texture2D;
//Transmittance_t-setInternalFormat(GL_RGB16F_ARB);
Transmittance_t-setSourceFormat(GL_RGBA);
Transmittance_t-setSourceType(GL_FLOAT);

Transmittance_t-setFilter(osg::Texture2D::MIN_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setFilter(osg::Texture2D::MAG_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setWrap(osg::Texture2D::WRAP_T, 
osg::Texture2D::CLAMP_TO_EDGE);
Transmittance_t-setWrap(osg::Texture2D::WRAP_S, 
osg::Texture2D::CLAMP_TO_EDGE);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance-allocateImage(256,64,1,GL_RGB, GL_FLOAT,1);
 image_Transmittance-setInternalTextureFormat(GL_RGB);
 float* dataPtr_Transmittance = (float*)image_Transmittance-data();
 for(int i=0;i256*64*3;i++)
{
*dataPtr_Transmittance++ = data[i];
}
Transmittance_t-setImage(image_Transmittance);
delete[] data;


... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Image-setData(unsigned char* data,AllocationModeallocationMode);

2010-02-01 Thread Thrall, Bryan
Roman Grigoriev wrote on 2010-02-01: 
 Transmittance_t-setImage(image_Transmittance);
   delete[] data;

setImage() uses the data buffer you pass to it, so if you delete it right after 
calling setImage(), the Image will use a deallocated buffer!

Does it work if you specify USE_NEW_DELETE (so the Image will delete the buffer 
for you when it doesn't need it any more) and don't delete[] data?
--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  


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


Re: [osg-users] uniform update question

2010-02-01 Thread Emmanuel Roche
Hi Paul,

On my side I finally ended with the initial design I had in mind:

I use a specific nodecallback on the node where the stateset containing my
uniforms is. This callbacks, used as a CullCallback give me the opportunity
to call the uniform update callbacks with a cullvisitor during the cull
phase.

It's not the cleanest option (I'd really wish there were cull callbacks for
uniforms directly!) but it works very well for me:

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

  // Bouml preserved body begin 00035E8A
// retrieve the stateset on the node:
osg::StateSet* ss = node-getStateSet();
if(ss) {
osg::StateSet::UniformList uniforms = ss-getUniformList();

for(osg::StateSet::UniformList::iterator uitr = uniforms.begin();
uitr != uniforms.end();
++uitr)
{
osg::Uniform::Callback* callback =
uitr-second.first-getUpdateCallback();
if (callback) (*callback)(uitr-second.first.get(),nv);
}
}

return traverse(node,nv);
  // Bouml preserved body end 00035E8A
}

Thanks to everyone for your help/explanations on this.

Manu.


2010/1/30 Paul Martz pma...@skew-matrix.com

 Emmanuel Roche wrote:

 Those questions were indeed closely related. Yet since I'm not planing to
 use slave cameras for the moment I guess I'm better of with my node
 cullcallback to update uniforms, at least I will try that.


 The subject was poorly chosen. The thread was more related to how to set a
 different uniform per cull/draw pair - per display or per window. Setting
 the uniforms in the slave camera StateSet is one solution, and Robert's
 recent code change is designed to support that usage.

 I wanted my solution to work whether the application used slave cameras or
 not, so, like you, I needed this to work without slave cameras. The solution
 I choose was to push a StateSet containing a uniform onto the CullVisitor's
 state stack.

 Hope that helps.
   -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] uniform update question

2010-02-01 Thread Paul Martz
So you are executing an update callback from a cull callback? Assuming 
your update callback actually modifies the uniform, this is not 
thread-safe and will likely crash if there are multiple concurrent cull 
traversals.


I got around this by keeping a StateSet (and Uniform) per CullVisitor. I 
used the CullVisitor address to look up the StateSet from a std::map. 
Then I could safely set the Uniform value.


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



Emmanuel Roche wrote:

Hi Paul,

On my side I finally ended with the initial design I had in mind:

I use a specific nodecallback on the node where the stateset containing 
my uniforms is. This callbacks, used as a CullCallback give me the 
opportunity to call the uniform update callbacks with a cullvisitor 
during the cull phase.


It's not the cleanest option (I'd really wish there were cull callbacks 
for uniforms directly!) but it works very well for me:


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


  // Bouml preserved body begin 00035E8A
// retrieve the stateset on the node:
osg::StateSet* ss = node-getStateSet();
if(ss) {
osg::StateSet::UniformList uniforms = ss-getUniformList();

for(osg::StateSet::UniformList::iterator uitr = uniforms.begin();
uitr != uniforms.end();
++uitr)
{
osg::Uniform::Callback* callback = 
uitr-second.first-getUpdateCallback();

if (callback) (*callback)(uitr-second.first.get(),nv);
}
}

return traverse(node,nv);
  // Bouml preserved body end 00035E8A
}

Thanks to everyone for your help/explanations on this.

Manu.


2010/1/30 Paul Martz pma...@skew-matrix.com 
mailto:pma...@skew-matrix.com


Emmanuel Roche wrote:

Those questions were indeed closely related. Yet since I'm not
planing to use slave cameras for the moment I guess I'm better
of with my node cullcallback to update uniforms, at least I
will try that.


The subject was poorly chosen. The thread was more related to how to
set a different uniform per cull/draw pair - per display or per
window. Setting the uniforms in the slave camera StateSet is one
solution, and Robert's recent code change is designed to support
that usage.

I wanted my solution to work whether the application used slave
cameras or not, so, like you, I needed this to work without slave
cameras. The solution I choose was to push a StateSet containing a
uniform onto the CullVisitor's state stack.

Hope that helps.
  -Paul


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





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

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


Re: [osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-02-01 Thread Roman Grigoriev
Thanx Brian! 
Now It works. 
I simply thought that when I call setImage data copied to another buffer.

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] locking nodes

2010-02-01 Thread Jim Brooks
I have a multithread application which might update an node
(add/remove children etc) at the same time

Safer/easier to have a global lock for the whole entire scene-graph,
rather than trying to lock a particular node.
Even if one node is locked, you might forget to lock its parent or children.
And even if you add more per-node locks, that creates potential for deadlocks.

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


[osg-users] integrating AntTweakBar GUI with OSG

2010-02-01 Thread Juan Casanueva
Hi,

I want to have a simple OpenGL rendered GUI in my OSG application.
I had a look at CEGUI, but I also found AntTweakBar which seem to do exactly 
what I want. 

I am going to try and integrate AntTweakBar with my OSG app, and before I start 
I was wondering if anybody has already done this? or if anybody can point me in 
the right direction on how to perform this

Many thanks
Juan Casanueva

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





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


Re: [osg-users] integrating AntTweakBar GUI with OSG

2010-02-01 Thread Juan Casanueva
btw AntTweakBar's page is http://www.antisphere.com/Wiki/tools:anttweakbar

Cheers,
Juan Casanueva

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





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


Re: [osg-users] Rendering 2 video stream

2010-02-01 Thread rudy
Adrian -
   
  A way that I've used for that type of functionality is through a  
   
Camera::DrawCallback subclass.  You can get the rendered scene through  
   
an (osg::Image) readPixels() call and pass it out through whatever
stream you  
like frame by frame.  It isn't extremely fast since it depends on the   
   
readPixels() call, but on a Quadro or the like it has always been 'fast 
   
enough' for my purposes.
   

   
  For the video stream output, I can't offer too much advice because I  
   
have usually been happy to work with the raw frames, but you can pretty 
   
much tie whatever you like at that point. 

Rudy

On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D) wrote:
 Hello all,
 
 i am looking for a library or idea how we could render osg into a video
 stream?
 
 /adrian
 
 -- 
 
 Adrian Egli

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

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


Re: [osg-users] Rendering 2 video stream

2010-02-01 Thread Cedric Pinson
Hi,
I render a video game based on osg into a video stream, you can have an
idea here http://plopbyte.net/?page_id=6/ you need a firefox plugin to
watch it.

The basic idea works on linux with gstreamer. Dont tested on windows but
because there is gstreamer, maybe it works too.

In the game code i added a thread that write image at a given rate. This
file is written into a file descriptor created with mkfifo.
Then i use a command line when the game is running:
gst-launch-0.10 filesrc location=myfifo ! videoparse width=800
height=600 format=15 framerate=20/1 ! ffmpegcolorspace ! videoscale !
video/x-raw-yuv, width=800, height=600 ! videoflip method=5  ! theoraenc
quality=40  ! oggmux ! gdppay ! tcpserversink port=12000 21 log

The advantage using gstreamer is that you can use the codec you want to
encode the video and stream it over the web.

The code is inside this project http://hg.plopbyte.net/pokme/

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com wrote:
 Adrian -  
  
   A way that I've used for that type of functionality is through a
  
 Camera::DrawCallback subclass.  You can get the rendered scene through
  
 an (osg::Image) readPixels() call and pass it out through whatever
 stream you  
 like frame by frame.  It isn't extremely fast since it depends on the 
  
 readPixels() call, but on a Quadro or the like it has always been 'fast   
  
 enough' for my purposes.  
  
   
  
   For the video stream output, I can't offer too much advice because I
  
 have usually been happy to work with the raw frames, but you can pretty   
  
 much tie whatever you like at that point. 
 
 Rudy
 
 On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D) 
 wrote:
  Hello all,
  
  i am looking for a library or idea how we could render osg into a video
  stream?
  
  /adrian
  
  -- 
  
  Adrian Egli
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


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


[osg-users] Camera Manipulator problem

2010-02-01 Thread ted morris
Greetings all,

I'm using the CameraManipulator from the NPS 11.x tutorial to follow a
MatrixTransform
object. The MatrixTransform position/orientation per usual with an Node
UpdateCallback.

The manipulator simply attaches a node to the MatrixTransform node
with a callback which grabs the parent NodePath (of the MatrixTransform
node),
represented in WOrld coordinates; i.e., per the demo code:.

snip
struct updateAccumulatedMatrix : public osg::NodeCallback
{
   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
   {
  matrix = osg::computeWorldToLocal(nv-getNodePath() );
  traverse(node,nv);
   }
   osg::Matrix matrix;
};
snip

What happens is that the camera appears to occasionally be updated with the
previous frame's
parent object position/orientation. The affect is that it will 'jitter' say,
every 10 frames or something like that...

I tried to setDataVariance(osg::Object::Dynamic) for both the
MatrixTransform and the node and
still the same problem. But, when I attach a built in CameraManipulator to
the viewer I don't have the
problem.

It is as if the node with the Callback is being called sometimes before,
or sometimes after,  the MatrixTransform parent object's callback. Possible?

What might I be missing? Is there a way to control when the
CameraManipulator is updating
the view matrix?

the app is running under WinXP 32b through wxWIndows/Visual Studio9, if that
matters.

thanks very much for any insights, suggestions, help--

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