Re: [osg-users] Texture and unsigned char* buffer

2010-04-21 Thread Anthony Face
Thanks for your answer, but that doesn't work. 
I found the error on my own.
It was this part of code i forgot:

Code:
osg::Vec2Array* texcoords = new osg::Vec2Array(4);
(*texcoords)[0].set(0.0f, 0.0f);
(*texcoords)[1].set(1.0f, 0.0f);
(*texcoords)[2].set(1.0f, 1.0f);
(*texcoords)[3].set(0.0f, 1.0f);
g-setTexCoordArray(0,texcoords);



Tanks who read me and try to help !

have fun !:D

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





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


Re: [osg-users] Multi screen VSync Linux NVidia

2010-04-21 Thread Bruce Wheaton

Serge, as Robert says, TwinView is what you need.

Here's the deal. On Nvidia non-Quadro cards on Linux, the only way to  
guarantee no tearing on one screen is:


UBB flipping enabled,

full screen OpenGL app, no obstructions,

Vsync flag with that screen number - there's an environment variable.

For dual screens, TwinView, with both screens with the *exact* same  
res and rate - same modeline, basically,


one OpenGL window/context filling both screens.

The way you're doing, with two contexts, will tear.

On Quadro cards, almost all conditions are lifted.

Bruce



On Apr 20, 2010, at 6:44 AM, Serge Lages wrote:


Hi all,

I'm currently having a problem with NVidia hardware on Linux, it's  
not directly OSG related, but I hope someone here can help me.


Here is my setup :

Ubuntu 9.10
195.36.15 NVidia drivers
2 GTX 285 graphic cards (one DVI, one VGA and one HDMI port)
4 screens (2 screens on each cards), all independents (no twinview)
Compiz disabled

On this setup, I have an OSG application running full-screen on all  
4 screens (a CompositeViewer with 4 views). My app is running at  
60fps when VSync is on, it's the screens refresh rate.


When I enable Sync to VBlank in the Nvidia-settings, here is the  
current result :
- On the first screen of each cards (plugged on the DVI port), the  
VSync is perfect, no tearing.
- On the second screen of each cards (plugged on the VGA port),  
tearing is noticeable on the upper part of the screens (I have a  
line about 100 pixel far from the top of the screens).
= Result : 2 screens without tearing, 2 screens with tearing in a  
specific location. It seems VSync is not really performed on the  
second screen of each cards.


I have also tested on GTX285 cards with 2 DVI ports with the same  
result.
Another note : the 4 screens are the same, all plugged in VGA with  
the same resolution (using an adaptor when plugged in the card DVI  
ports). I've tested with other screens with the same result.


Anyone knows where this problem comes from ? And any idea how to  
solve it ? Is it a bug in recent drivers, maybe I should test olders ?

Thanks in advance for your help.

Best regards,

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


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


Re: [osg-users] Multi screen VSync Linux NVidia

2010-04-21 Thread Serge Lages
OK thank you Bruce for the info.

Cheers,

On Wed, Apr 21, 2010 at 8:53 AM, Bruce Wheaton br...@spearmorgan.comwrote:

 Serge, as Robert says, TwinView is what you need.

 Here's the deal. On Nvidia non-Quadro cards on Linux, the only way to
 guarantee no tearing on one screen is:

 UBB flipping enabled,

 full screen OpenGL app, no obstructions,

 Vsync flag with that screen number - there's an environment variable.

 For dual screens, TwinView, with both screens with the *exact* same res and
 rate - same modeline, basically,

 one OpenGL window/context filling both screens.

 The way you're doing, with two contexts, will tear.

 On Quadro cards, almost all conditions are lifted.

 Bruce



 On Apr 20, 2010, at 6:44 AM, Serge Lages wrote:

 Hi all,

 I'm currently having a problem with NVidia hardware on Linux, it's not
 directly OSG related, but I hope someone here can help me.

 Here is my setup :

 Ubuntu 9.10
 195.36.15 NVidia drivers
 2 GTX 285 graphic cards (one DVI, one VGA and one HDMI port)
 4 screens (2 screens on each cards), all independents (no twinview)
 Compiz disabled

 On this setup, I have an OSG application running full-screen on all 4
 screens (a CompositeViewer with 4 views). My app is running at 60fps when
 VSync is on, it's the screens refresh rate.

 When I enable Sync to VBlank in the Nvidia-settings, here is the current
 result :
 - On the first screen of each cards (plugged on the DVI port), the VSync is
 perfect, no tearing.
 - On the second screen of each cards (plugged on the VGA port), tearing is
 noticeable on the upper part of the screens (I have a line about 100 pixel
 far from the top of the screens).
 = Result : 2 screens without tearing, 2 screens with tearing in a specific
 location. It seems VSync is not really performed on the second screen of
 each cards.

 I have also tested on GTX285 cards with 2 DVI ports with the same result.
 Another note : the 4 screens are the same, all plugged in VGA with the same
 resolution (using an adaptor when plugged in the card DVI ports). I've
 tested with other screens with the same result.

 Anyone knows where this problem comes from ? And any idea how to solve it ?
 Is it a bug in recent drivers, maybe I should test olders ?
 Thanks in advance for your help.

 Best regards,

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



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




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


Re: [osg-users] osgtexture1d example / osg::TexGenNode order

2010-04-21 Thread Robert Osfield
HI Hartwig,

On Tue, Apr 20, 2010 at 11:23 PM, Hartwig Wiesmann
hartwig.wiesm...@wanadoo.nl wrote:
 yes, this is what I understand, I think. But that means the example relies on 
 the fact that children added to a parent are ordered in the same way as they 
 are added.
 So,

 root-addChild(texGenNode);
 root-addChild(loadedModel);

The ordering of the children makes no difference to the result unless
you have multiple TexGenNodes that are both attempting to set the same
texgen planes in which case the last one traversed will be the one
that sets the position.  There is only one position per texgen
maintained per RenderStage in the OSG's rendering back-end.

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


[osg-users] Move object with callback

2010-04-21 Thread daniele argiolas
Hi,
in my program I've external inputs that change the position of my object. I do 
this with setUpdateCallback that call a function that returns 
osg::NodeCallback*, with osg::AnimationPath* and AnimationPathCallback I set 
new position and new angle.
Is there a way more convenient to do this?
I tried to do this with TrasformationMatrix ecc but for setUpdateCallback I 
need a NodeCallback* return.
Have you some ideas? 

Thank you!

Cheers,
daniele

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





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


Re: [osg-users] Unref image after apply

2010-04-21 Thread Serge Lages
OK thank you Robert, I'll unref manually my images.

Cheers,

On Tue, Apr 20, 2010 at 8:16 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Serge,

 Enable the unref image after apply in your case is a bit awkward as,
 as you have found, the mechanism assumes that all contexts will
 require the texture.

 Another way around the issue is to use the texture object pool to keep
 a cap on the memory usage on the driver and GPU side.  Another route
 migt be to make areAllTextureObjectsLoaded() virtue or have a callback
 for it so you can customize the behavior.

 Robert.

 On Tue, Apr 20, 2010 at 6:21 PM, Serge Lages serge.la...@gmail.com
 wrote:
  Hi Robert and all,
  Another question related to multi-screen/multi-context applications (yes,
  still one...). I am currently trying to save some memory on my
 application,
  so I want some of my textures to be uploaded in the graphic card and
 release
  it from the classic RAM, that's why I set setUnRefImageDataAfterApply to
  true.
  But looking at Texture2D.cpp, here is the conditions to unref an image :
  state.getMaxTexturePoolSize()==0 
  _unrefImageDataAfterApply 
  areAllTextureObjectsLoaded() 
  image-getDataVariance()==STATIC
  I am currently having troubles with the areAllTextureObjectsLoaded
  condition, it checks if all the available contexts have uploaded the
  texture. The problem here is that my texture is designed only for one of
 my
  screens, so it's applied for only one context, so this condition is
 always
  false and the image is never released.
  Am I doing something wrong ? And is there any way to force my image to be
  unref ? The only solution is a custom callback setting the image to NULL
  after a first apply ?
  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
 
 
 ___
 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] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Mikhail I. Izmestev
 Hi Mikail,

 Could you please post the whole modified file, as per the other
 requests and the detailed on the SubmissionsProtocol page.


 http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol

 Thanks,
 Robert.


Hello Robert.

I don't see any reason of posting whole modified file. You can use patch:
$ cd src/osgViewer/
$ patch -p0  ~/gw.patch

For windows users patch program can be downloaded from:
http://gnuwin32.sourceforge.net/packages/patch.htm

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


Re: [osg-users] osgEarth fading effect?

2010-04-21 Thread Akilan Thangamani
Robert,

  I set our terrain  as input (output.ive) to the same 
osgmultitexturecontrol example. It is returning false from the function where 
node to the type of multitexturecontrol  is searched  from our terrain 
i.e.,dynamic_cast to multitexturecontrol is failing.   Expected elevation 
blending/fading layers is not happening. Pls let me understand the problem.

Akilan. A

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





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


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Robert Osfield
Hi Mikhail,

On Wed, Apr 21, 2010 at 9:13 AM, Mikhail I. Izmestev
izmmish...@gmail.com wrote:

 I don't see any reason of posting whole modified file. You can use patch:
 $ cd src/osgViewer/
 $ patch -p0  ~/gw.patch

I know how to apply I patch, but it's just not reliable enough,
patches fail and when they do you have to go back to original author
and ask for the files.  Patches also cause me more work as I can to
create a full modified file and then do a graphical diff against the
original file so I can do a proper review.

Over the last decade of developing the OSG I have found the most
reliable way to merge changes is to it graphically from full source
files, the policy of requiring full files hasn't just popped out of
the air to make you life more awkward - it's there to make sure the
quality of the OSG remains high and that the process is efficient.

Please provide full modified files, if you wish also provide the patch
files as well as this sometimes can help a quick look but I don't use
them for final merge as they just don't cut it.

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


Re: [osg-users] osgEarth fading effect?

2010-04-21 Thread Torben Dannhauer
Hi akilan,

May we have got our wires crossed.

You can create osgTerrain with more than one texturelayer. As default layer 0 
is shown. You can blend to an of the other texture layers with the multi 
texture control.

If I read your problem, I wonder If you are talking about fading to differenz 
LODs. 

Assume you fly 4 feet above ground, and then you dive near ground, so your 
tiles will be replaced by higher resolution tiles. Usually the tiles pop in. 
Sometimes this is clear visible, if distant enough it is hardly visible. Do you 
want to replace this LOD popping by fading to ney LOD?

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Mikhail I. Izmestev
 Please provide full modified files, if you wish also provide the patch
 files as well as this sometimes can help a quick look but I don't use
 them for final merge as they just don't cut it.

Hello Robert.

I sent a patch not for final merge, just to show which part of code
causes problem.

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


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Torben Dannhauer
Hi Mikhail,

showing what code causes trouble implies the same efford for applying patch 
etc. as reviewing for merge, so also for that purposes it would be great to 
follow the submission protocol.

If you have additionally modified your file containing some private code lines 
you don't want to disclose, I could understand your aproach.


Thank you!

Cheers,
Torben

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





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


[osg-users] Access Violation in wglChoosePixelFormat when running with Purify

2010-04-21 Thread Florian Kolbe
Hi,

I am running OpenSceneGraph-2.8.3 on Windows XP and my app runs fine.
Running it with Purify though, I get an Access Violation in 
wglChoosePixelFormat.
I'm pretty sure it's the call from the osgViewer (GraphicsWindowWin32.cpp).

[E] EXU: Unhandled exception in wglChoosePixelFormat {1 occurrence}
Exception code: 0xc005 [Error: access violation reading from 
0x0564]
Exception address: [C:\WINDOWS\SYSTEM32\OPENGL32.DLL ip=0x5F0FAED7]
Filter: [C:\Programme\IBM\RationalPurifyPlus\Common\PURERT.DLL 
ip=0x3F018190]
Exception location
 [c:\WINDOWS\SYSTEM32\OPENGL32.DLL ip=0x5F0FAED9] 

I assume that Purify has trouble with the function call where the function 
pointer was retrieved via wglGetProcAddress? Does anyone have experience with 
this?

Thank you!

Cheers,
Florian

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





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


Re: [osg-users] osgEarth fading effect?

2010-04-21 Thread Akilan Thangamani
Hi zonk,

To say straghtly, same region has been constituted by multi resolution tiles.
The transition from coarser to better resolution tile will take place based on 
the height we are.   As u said, exactly I like to know  about the LOD popping 
by fadding only. 

Akilan. A

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





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


Re: [osg-users] osgEarth fading effect?

2010-04-21 Thread Torben Dannhauer
Hi Akilan,

thank you, than your question is my question too :)

My thoughts: 
I don't know if osg already provides a fading node to fade in/out the 
subsequent scenegraph.

If not, maybe you should develop one. This node could be used in your 
osgTerrain to introduce fading in the LOD mechanism.



Thank you!

Cheers,
Torben

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





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


[osg-users] Using OSG in an Java window

2010-04-21 Thread Paul Gotzel




Hello,

Does anyone have a good example of rendering with the osgViewer in an
java.awt.Canvas or something similar? I've found http://www.noodleheaven.net/JavaOSG/javaosg.html
but this seems about 5 years out of date so I'm not sure if I should go
near it. I'm not actually interested in wrapping the OSG api in Java.
I want a way to use the Java Canvas as the source for the OGL context.
-- 
Paul Gotzel




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


[osg-users] background image

2010-04-21 Thread Anthony Face
Hi,

I would like to put an quad as background, i would like to know if it is 
possible to have the required size to do this. (eg: if zFar is at 10 000 how is 
height and how is height?)


thanks a lot !

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





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


[osg-users] About osg::OcclusionQueryNode

2010-04-21 Thread Jean-Sébastien Guay

Hi all, hi Paul,

I have a few questions about OcclusionQueryNode since I'm going to start 
using it in our software soon (that's one of the cool things about 
having a new stable release of OSG to upgrade to, you get cool new 
things to play with! Thanks again for your work on 2.8.3 Paul!)


First of all, running the osgocclusionquery example, I get erratic 
results (though this is the one from the svn trunk, not 2.8.3, but my 
understanding is that the version in 2.8.3 is basically up to date with 
the trunk). For example, if I turn the camera so I see the back of the 
box straight-on (perpendicular to the view vector) I get the same stats 
as if I view it from the front (i.e. seeing all the lines). If I just 
turn the camera slightly so the back is not exactly perpendicular, then 
the GPU time goes down considerably (as I'd have expected even when 
looking at the back). Is this normal?


The second thing I wonder is that looking at the code, I don't see 
anything that lets the OcclusionQueryNode work if the required GL 
extensions are not present. I don't see any explicit test for the 
required extensions. Perhaps I just missed it, could you point it out to 
me if I did? Or is it up to the app to not use OcclusionQueryNodes if 
they're not supported on the hardware it's running on?


In particular, in RetrieveQueriesCallback, I see this line of code:

ext-glGetQueryObjectiv( tr-_id, GL_QUERY_RESULT, (tr-_numPixels) );

glGetQueryObjectiv is defined as this:

void Drawable::Extensions::glGetQueryObjectiv(GLuint id, GLenum pname, 
GLint *params) const

{
  if (_gl_get_query_objectiv_arb)
_gl_get_query_objectiv_arb(id, pname, params);
  else
osg::notify(osg::WARN)  Error: glGetQueryObjectiv not supported 
by OpenGL driver  std::endl;

}

which means that if it's not supported, then the call will return, 
printing a warning, but not modifying tr-_numPixels. But the default 
constructor of TestResult sets this to 0. So since there's no test to 
see if glGetQueryObjectiv is supported or not before the call, that 
means that the geometry under the OQN will always be culled as if it had 
0 visible pixels if it's not supported? Surely that's not the intended 
result.


Perhaps the TestResult default constructor should set _numPixels to -1, 
and then if it stays -1 even after the call to glGetQueryObjectiv, the 
OQN should be disabled? Or just explicitly test if glGetQueryObjectiv is 
supported...


Any insight into this would be appreciated. I need to make sure my 
software runs on any hardware but I'd really like to take advantage of 
this new feature in OSG... Thanks in advance,


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] background image

2010-04-21 Thread Alberto Luaces
Anthony Face writes:

 I would like to put an quad as background, i would like to know if it is 
 possible to have the required size to do this. (eg: if zFar is at 10 000 how 
 is height and how is height?)

Hi Anthony,

I'd rather use a HUD-like technique as shown in the osghud example. The
only difference is that you'd had to use the PRE_RENDER flag instead of
the POST_RENDER one.

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


Re: [osg-users] Osg on Windows Mobile

2010-04-21 Thread Aitor Ardanza
I can't define OPENGL_INCLUDE and OPENGL_LIBRARY CMake settings... does't give 
me those options.
I'm using 2.8.1 version, the last.

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





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


Re: [osg-users] Osg on Windows Mobile

2010-04-21 Thread Robert Osfield
Hi Aitor,

On Wed, Apr 21, 2010 at 3:21 PM, Aitor Ardanza aitoralt...@terra.es wrote:
 I can't define OPENGL_INCLUDE and OPENGL_LIBRARY CMake settings... does't 
 give me those options.
 I'm using 2.8.1 version, the last.

OpenGL ES support is only available in the 2.9.x dev series and
svn/trunk, you won't be able to use 2.8.x for OpenGL ES work.

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


Re: [osg-users] Unref image after apply

2010-04-21 Thread Serge Lages
Hi Robert,

I was wondering, if I unref manually my images but also activate the texture
pool with OSG_TEXTURE_POOL_SIZE, is there any risk that one of my images
will be unloaded from the graphic card and then it will be impossible to
load it again because it has been unref ?

Thanks !

On Wed, Apr 21, 2010 at 10:06 AM, Serge Lages serge.la...@gmail.com wrote:

 OK thank you Robert, I'll unref manually my images.

 Cheers,


 On Tue, Apr 20, 2010 at 8:16 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Serge,

 Enable the unref image after apply in your case is a bit awkward as,
 as you have found, the mechanism assumes that all contexts will
 require the texture.

 Another way around the issue is to use the texture object pool to keep
 a cap on the memory usage on the driver and GPU side.  Another route
 migt be to make areAllTextureObjectsLoaded() virtue or have a callback
 for it so you can customize the behavior.

 Robert.

 On Tue, Apr 20, 2010 at 6:21 PM, Serge Lages serge.la...@gmail.com
 wrote:
  Hi Robert and all,
  Another question related to multi-screen/multi-context applications
 (yes,
  still one...). I am currently trying to save some memory on my
 application,
  so I want some of my textures to be uploaded in the graphic card and
 release
  it from the classic RAM, that's why I set setUnRefImageDataAfterApply to
  true.
  But looking at Texture2D.cpp, here is the conditions to unref an image :
  state.getMaxTexturePoolSize()==0 
  _unrefImageDataAfterApply 
  areAllTextureObjectsLoaded() 
  image-getDataVariance()==STATIC
  I am currently having troubles with the areAllTextureObjectsLoaded
  condition, it checks if all the available contexts have uploaded the
  texture. The problem here is that my texture is designed only for one of
 my
  screens, so it's applied for only one context, so this condition is
 always
  false and the image is never released.
  Am I doing something wrong ? And is there any way to force my image to
 be
  unref ? The only solution is a custom callback setting the image to NULL
  after a first apply ?
  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
 
 
 ___
 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


Re: [osg-users] Unref image after apply

2010-04-21 Thread Robert Osfield
Hi Serge,

On Wed, Apr 21, 2010 at 4:31 PM, Serge Lages serge.la...@gmail.com wrote:
 I was wondering, if I unref manually my images but also activate the texture
 pool with OSG_TEXTURE_POOL_SIZE, is there any risk that one of my images
 will be unloaded from the graphic card and then it will be impossible to
 load it again because it has been unref ?

Yes there is this danger.

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


[osg-users] Windows VS2010 build errors -SVN -11354

2010-04-21 Thread Martin Naylor
Hi,

I am having a few errors in building the latest SVN.

Error  9  error C2065: 'GL_DEPTH_COMPONENT32F' : undeclared
identifier
D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp  151
1example_osgfpdepth

Error  10   error C2065: 'GL_DEPTH_COMPONENT32F_NV' : undeclared
identifier
D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp  153
1example_osgfpdepth

Error  14   error C2065: 'GL_DEPTH_COMPONENT32F' : undeclared
identifier
D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp  766
1example_osgfpdepth

Error  15   error C2065: 'GL_DEPTH_COMPONENT32F_NV' : undeclared
identifier
D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp  768
1example_osgfpdepth

 

Do i need to download to download the extensions file or am I missing
something with example, such as a requirement for Nvidia SDK?

 

Also while testing VS2010 it doesn't be appearing to copying the dll and
.exe files to the bin folder, its creating a debug and release folder within
the bin folder as reported earlier by someone else on the list.

I would look at CMake but I don't have a clue which file to start looking
at, have tried the latest build of cmake but that still does the same.

Can anyone give me some clues or pointers on where to look in cmake or where
the files are copied or locations are defined? I will give it a go at
figuring out?

 

Thanks

 

Martin.

 

 

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


Re: [osg-users] Osg on Windows Mobile

2010-04-21 Thread Aitor Ardanza

Aitor wrote:
 I can't define OPENGL_INCLUDE and OPENGL_LIBRARY CMake settings... does't 
 give me those options.
 I'm using 2.8.1 version, the last.
 

I was  referring to CMake version... sorry for the confusion.
I'm usin osg 2.9.7 version.

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





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


Re: [osg-users] Osg on Windows Mobile

2010-04-21 Thread Robert Osfield
HI Aitor,

On Wed, Apr 21, 2010 at 4:53 PM, Aitor Ardanza aitoralt...@terra.es wrote:
 Aitor wrote:
 I can't define OPENGL_INCLUDE and OPENGL_LIBRARY CMake settings... does't 
 give me those options.
 I'm using 2.8.1 version, the last.


 I was  referring to CMake version... sorry for the confusion.
 I'm usin osg 2.9.7 version.

I'm not familiar with Cmake under Windows.  If you can work out to try
toggling on the advanced options.

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


Re: [osg-users] Windows VS2010 build errors -SVN -11354

2010-04-21 Thread Mourad Boufarguine
Hi Martin,

I just submitted a patch for this on the submission mail list. (thread
: [osg-submissions]
floating point depth buffer example and changing FBOs)

Mourad


On Wed, Apr 21, 2010 at 5:44 PM, Martin Naylor
martin.nay...@dsl.pipex.comwrote:

  Hi,

 I am having a few errors in building the latest SVN.

 Error  9  error C2065: 'GL_DEPTH_COMPONENT32F' : undeclared
 identifier
 D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp
 151 1example_osgfpdepth

 Error  10   error C2065: 'GL_DEPTH_COMPONENT32F_NV' :
 undeclared identifier
 D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp
 153 1example_osgfpdepth

 Error  14   error C2065: 'GL_DEPTH_COMPONENT32F' : undeclared
 identifier
 D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp
 766 1example_osgfpdepth

 Error  15   error C2065: 'GL_DEPTH_COMPONENT32F_NV' :
 undeclared identifier
 D:\Coding\OSG\OpenSceneGraphx64\examples\osgfpdepth\osgfpdepth.cpp
 768 1example_osgfpdepth



 Do i need to download to download the extensions file or am I missing
 something with example, such as a requirement for Nvidia SDK?



 Also while testing VS2010 it doesn’t be appearing to copying the dll and
 .exe files to the bin folder, its creating a debug and release folder within
 the bin folder as reported earlier by someone else on the list.

 I would look at CMake but I don’t have a clue which file to start looking
 at, have tried the latest build of cmake but that still does the same.

 Can anyone give me some clues or pointers on where to look in cmake or
 where the files are copied or locations are defined? I will give it a go at
 figuring out?



 Thanks



 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] About osg::OcclusionQueryNode

2010-04-21 Thread Paul Martz

Hi J-S -- Thanks for taking the new OcclusionQueryNode for a test drive.

Jean-Sébastien Guay wrote:
First of all, running the osgocclusionquery example, I get erratic 
results (though this is the one from the svn trunk, not 2.8.3, but my 
understanding is that the version in 2.8.3 is basically up to date with 
the trunk). For example, if I turn the camera so I see the back of the 
box straight-on (perpendicular to the view vector) I get the same stats 
as if I view it from the front (i.e. seeing all the lines). If I just 
turn the camera slightly so the back is not exactly perpendicular, then 
the GPU time goes down considerably (as I'd have expected even when 
looking at the back). Is this normal?


Here's the problem: What to do when the eye is so close to the query geometry 
that the eye is actually inside the query geometry itself? It would be 
inefficient to actually do a query in this case, and makes more sense to just 
assume that the geometry is visible.


One of the recent changes (in 2.8.3 and svn trunk) fixes some previous problems 
by changing how to test for this condition. The current code checks to see if 
the near plane penetrates the bounding sphere of the query geometry. If so, the 
geometry is considered visible. Unfortunately, in the simple osgocclusionquery 
example, the autocomputation of near/far causes the near plane to be inside the 
query geometry bound almost all the time. When the query geometry is part of a 
larger scene and surrounded by a larger view volume, with the eye at some 
distance, the current algorithm performs correctly.


So I think the osgocclusionquery test case is contrived, but if you really need 
it to work, then one workaround would be to change the example to disable 
autocomputation of near/far. But to fix OcclusionQueryNode so that it handles 
this case better, we'd need to do a full query in this situation, and I guess 
it's debatable as to whether this would actually be an improvement or not.


The second thing I wonder is that looking at the code, I don't see 
anything that lets the OcclusionQueryNode work if the required GL 
extensions are not present. I don't see any explicit test for the 
required extensions. Perhaps I just missed it, could you point it out to 
me if I did? Or is it up to the app to not use OcclusionQueryNodes if 
they're not supported on the hardware it's running on?


In particular, in RetrieveQueriesCallback, I see this line of code:

ext-glGetQueryObjectiv( tr-_id, GL_QUERY_RESULT, (tr-_numPixels) );

glGetQueryObjectiv is defined as this:

void Drawable::Extensions::glGetQueryObjectiv(GLuint id, GLenum pname, 
GLint *params) const

{
  if (_gl_get_query_objectiv_arb)
_gl_get_query_objectiv_arb(id, pname, params);
  else
osg::notify(osg::WARN)  Error: glGetQueryObjectiv not supported 
by OpenGL driver  std::endl;

}

which means that if it's not supported, then the call will return, 
printing a warning, but not modifying tr-_numPixels. But the default 
constructor of TestResult sets this to 0. So since there's no test to 
see if glGetQueryObjectiv is supported or not before the call, that 
means that the geometry under the OQN will always be culled as if it had 
0 visible pixels if it's not supported? Surely that's not the intended 
result.


Perhaps the TestResult default constructor should set _numPixels to -1, 
and then if it stays -1 even after the call to glGetQueryObjectiv, the 
OQN should be disabled? Or just explicitly test if glGetQueryObjectiv is 
supported...


I admit I didn't design this code to work on older hardware, nor have I tested 
it on hardware without this capability. Please feel free to make any necessary 
changes to that it at least behaves like a regular Group node when the feature 
isn't present.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Windows VS2010 build errors -SVN -11354

2010-04-21 Thread Robert Osfield
On Wed, Apr 21, 2010 at 5:09 PM, Mourad Boufarguine
mourad.boufargu...@gmail.com wrote:
 Hi Martin,
 I just submitted a patch for this on the submission mail list. (thread
 : [osg-submissions] floating point depth buffer example and changing FBOs)
 Mourad

Fix is now merged and submitted to svn/trunk ;-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] About osg::OcclusionQueryNode

2010-04-21 Thread Jean-Sébastien Guay

Hi Paul,


So I think the osgocclusionquery test case is contrived, but if you
really need it to work, then one workaround would be to change the
example to disable autocomputation of near/far. But to fix
OcclusionQueryNode so that it handles this case better, we'd need to
do a full query in this situation, and I guess it's debatable as to
whether this would actually be an improvement or not.


Thanks for the explanation, it makes total sense. When the box is viewed 
with the view vector perpendicular to one of the faces, the computed 
near plane grazes the surface, so it intersects the bounding sphere.


I guess I would modify the example to disable automatic near/far 
computation, with a clear comment as to why we do this and why it 
shouldn't be a problem in regular scenes (so people don't go disabling 
it if they don't need to in their apps). That way the example would 
perform well and people just looking at the example wouldn't get the 
wrong impression that there's a bug or something like that.


I'll try to get to this soon.


I admit I didn't design this code to work on older hardware, nor have I
tested it on hardware without this capability. Please feel free to make
any necessary changes to that it at least behaves like a regular Group
node when the feature isn't present.


OK, well the first thing I'll do is obviously try it :-) My analysis of 
the code might be wrong, it's just after a quick read-through. But yeah, 
if I see it's behaving wrong, I'll try to fix it.


I've integrated it successfully into our software, btw. Was very easy, 
and works great (at least on this machine, nVidia 9800 GTX+). Now I just 
have to educate our artist on where to place those nodes. ;-)


Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] About osg::OcclusionQueryNode

2010-04-21 Thread Todd J. Furlong

J-S,

What modeling software is your artist using that allows placement of 
occlusion query nodes?


Thanks,
Todd

On 4/21/2010 12:47 PM, Jean-Sébastien Guay wrote:

Hi Paul,


So I think the osgocclusionquery test case is contrived, but if you
really need it to work, then one workaround would be to change the
example to disable autocomputation of near/far. But to fix
OcclusionQueryNode so that it handles this case better, we'd need to
do a full query in this situation, and I guess it's debatable as to
whether this would actually be an improvement or not.


Thanks for the explanation, it makes total sense. When the box is viewed
with the view vector perpendicular to one of the faces, the computed
near plane grazes the surface, so it intersects the bounding sphere.

I guess I would modify the example to disable automatic near/far
computation, with a clear comment as to why we do this and why it
shouldn't be a problem in regular scenes (so people don't go disabling
it if they don't need to in their apps). That way the example would
perform well and people just looking at the example wouldn't get the
wrong impression that there's a bug or something like that.

I'll try to get to this soon.


I admit I didn't design this code to work on older hardware, nor have I
tested it on hardware without this capability. Please feel free to make
any necessary changes to that it at least behaves like a regular Group
node when the feature isn't present.


OK, well the first thing I'll do is obviously try it :-) My analysis of
the code might be wrong, it's just after a quick read-through. But yeah,
if I see it's behaving wrong, I'll try to fix it.

I've integrated it successfully into our software, btw. Was very easy,
and works great (at least on this machine, nVidia 9800 GTX+). Now I just
have to educate our artist on where to place those nodes. ;-)

Thanks,

J-S

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


Re: [osg-users] About osg::OcclusionQueryNode

2010-04-21 Thread Jean-Sébastien Guay

Hi Todd,


What modeling software is your artist using that allows placement of
occlusion query nodes?


Sorry, that's not what I meant. We have configuration files alongside 
the models, where you can specify different things like alternate 
shaders, textures to load into other texture units (which will then be 
used by the shaders), whether to generate tangent space coordinates for 
normal mapping, etc. I just added a flag in that configuration file that 
says if an OcclusionQueryNode should be added.


The thing is that you can specify this per-node in the model, but you 
don't want to put one OQN per node if they're individually pretty small, 
it would be preferable to place one OQN higher up in the graph, for a 
group of close-by objects. That's the education I was talking about... ;-)


I'd like to be able to say we have an in-house modeling software that 
allows us to do all these things, but unfortunately it's config files.


The osgocclusionquery example has a visitor that will only insert OQNs 
when the vertex count of children exceeds a threshold (5000 by default) 
but I wanted the control to place it where I want, because if I have a 
graph with 2 children, one with 5010 vertices and one with 4000, then 
with the visitor I would get an OQN above the first child but not the 
second, whereas I want an OQN above both (above their parent).


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Allen Saucier
Hi Art,

I decided to start a new thread on this issue.  It's a biggy for me.  

here's what I get every time I attempt to compile the svn version of osgPPU 
agains osg 2.8.3:

Code:

[al...@nlosdemobox:]$ make
Scanning dependencies of target osgPPU
[  2%] Building CXX object src/osgPPU/CMakeFiles/osgPPU.dir/Unit.o
In file included from /home/allen/projects/osgPPU/src/osgPPU/Unit.cpp:17:
/home/allen/projects/osgPPU/include/osgPPU/Unit.h: In member function ‘void 
osgPPU::Unit::popFrameBufferObject(osg::State)’:
/home/allen/projects/osgPPU/include/osgPPU/Unit.h:311: error: ‘class 
osg::FBOExtensions’ has no member named ‘glBindFramebuffer’
/home/allen/projects/osgPPU/src/osgPPU/Unit.cpp: In member function ‘virtual 
void osgPPU::Unit::DrawCallback::drawImplementation(osg::RenderInfo, const 
osg::Drawable*) const’:
/home/allen/projects/osgPPU/src/osgPPU/Unit.cpp:698: error: ‘class 
osg::PixelDataBufferObject’ has no member named ‘getOrCreateGLBufferObject’
/home/allen/projects/osgPPU/src/osgPPU/Unit.cpp:700: error: ‘class 
osg::PixelDataBufferObject’ has no member named ‘getOrCreateGLBufferObject’
make[2]: *** [src/osgPPU/CMakeFiles/osgPPU.dir/Unit.o] Error 1
make[1]: *** [src/osgPPU/CMakeFiles/osgPPU.dir/all] Error 2
make: *** [all] Error 2
[al...@nlosdemobox:]$ osgversiond
bash: osgversiond: command not found
[al...@nlosdemobox:]$ osgversion
OpenSceneGraph Library 2.8.3




Here is a listing of my libraries.  They are pointed to the correct 2.8.3 
libraries for osg.  I have determined from osgPPU's CMakeCache.txt file what 
osg .so's the compiler is linking against.  All looks good.


Code:

lrwxrwxrwx  1 root root20 2009-06-18 17:16 libOpenThreads.so - 
libOpenThreads.so.11
lrwxrwxrwx  1 root root23 2009-06-18 17:16 libOpenThreads.so.11 - 
libOpenThreads.so.2.4.0
-rw-r--r--  1 root root 42111 2010-04-16 08:58 libOpenThreads.so.2.4.0
lrwxrwxrwx  1 root root21 2010-04-16 09:08 libosgAnimation.so - 
libosgAnimation.so.65
-rw-r--r--  1 root root319640 2009-06-18 16:51 libosgAnimation.so.2.8.1
-rw-r--r--  1 root root720946 2010-04-16 09:06 libosgAnimation.so.2.8.3
lrwxrwxrwx  1 root root24 2009-06-18 17:16 libosgAnimation.so.55 - 
libosgAnimation.so.2.8.1
lrwxrwxrwx  1 root root24 2010-04-16 09:08 libosgAnimation.so.65 - 
libosgAnimation.so.2.8.3
lrwxrwxrwx  1 root root14 2010-04-16 09:08 libosgDB.so - libosgDB.so.65
-rw-r--r--  1 root root667776 2009-06-18 16:48 libosgDB.so.2.8.1
-rw-r--r--  1 root root676644 2010-04-16 09:00 libosgDB.so.2.8.3
lrwxrwxrwx  1 root root17 2009-06-18 17:16 libosgDB.so.55 - 
libosgDB.so.2.8.1
lrwxrwxrwx  1 root root17 2010-04-16 09:08 libosgDB.so.65 - 
libosgDB.so.2.8.3
lrwxrwxrwx  1 root root14 2010-04-16 09:08 libosgFX.so - libosgFX.so.65
-rw-r--r--  1 root root219355 2009-06-18 16:52 libosgFX.so.2.8.1
-rw-r--r--  1 root root219354 2010-04-16 09:00 libosgFX.so.2.8.3
lrwxrwxrwx  1 root root17 2009-06-18 17:16 libosgFX.so.55 - 
libosgFX.so.2.8.1
lrwxrwxrwx  1 root root17 2010-04-16 09:08 libosgFX.so.65 - 
libosgFX.so.2.8.3
lrwxrwxrwx  1 root root14 2010-04-16 09:08 libosgGA.so - libosgGA.so.65
-rw-r--r--  1 root root342494 2009-06-18 16:50 libosgGA.so.2.8.1
-rw-r--r--  1 root root342503 2010-04-16 09:01 libosgGA.so.2.8.3
lrwxrwxrwx  1 root root17 2009-06-18 17:16 libosgGA.so.55 - 
libosgGA.so.2.8.1
lrwxrwxrwx  1 root root17 2010-04-16 09:08 libosgGA.so.65 - 
libosgGA.so.2.8.3
-rw-r--r--  1 root root510500 2010-04-16 09:31 libosgGtk.a
-rwxr-xr-x  1 root root  1961 2010-04-16 09:31 libosgGtk.la
-rw-r--r--  1 root root658254 2010-04-16 09:31 libosgGtkmm.a
-rwxr-xr-x  1 root root  2554 2010-04-16 09:31 libosgGtkmm.la
lrwxrwxrwx  1 root root20 2010-04-16 09:31 libosgGtkmm.so - 
libosgGtkmm.so.0.0.0
lrwxrwxrwx  1 root root20 2010-04-16 09:31 libosgGtkmm.so.0 - 
libosgGtkmm.so.0.0.0
-rwxr-xr-x  1 root root515483 2010-04-16 09:31 libosgGtkmm.so.0.0.0
lrwxrwxrwx  1 root root18 2010-04-16 09:31 libosgGtk.so - 
libosgGtk.so.0.0.0
lrwxrwxrwx  1 root root18 2010-04-16 09:31 libosgGtk.so.0 - 
libosgGtk.so.0.0.0
-rwxr-xr-x  1 root root392217 2010-04-16 09:31 libosgGtk.so.0.0.0
lrwxrwxrwx  1 root root23 2010-04-16 09:08 libosgManipulator.so - 
libosgManipulator.so.65
-rw-r--r--  1 root root349028 2009-06-18 16:52 libosgManipulator.so.2.8.1
-rw-r--r--  1 root root349037 2010-04-16 09:06 libosgManipulator.so.2.8.3
lrwxrwxrwx  1 root root26 2009-06-18 17:16 libosgManipulator.so.55 - 
libosgManipulator.so.2.8.1
lrwxrwxrwx  1 root root26 2010-04-16 09:08 libosgManipulator.so.65 - 
libosgManipulator.so.2.8.3
lrwxrwxrwx  1 root root20 2010-04-16 09:08 libosgParticle.so - 
libosgParticle.so.65
-rw-r--r--  1 root root364487 2009-06-18 16:53 libosgParticle.so.2.8.1
-rw-r--r--  1 root root364487 2010-04-16 09:01 libosgParticle.so.2.8.3
lrwxrwxrwx  1 root root 

Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Allen Saucier
O, one other note.  I have the exact same issues under Windows XP.

--Allen

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





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


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Paul Martz

Allen Saucier wrote:

[al...@nlosdemobox:]$ make
Scanning dependencies of target osgPPU
[  2%] Building CXX object src/osgPPU/CMakeFiles/osgPPU.dir/Unit.o
In file included from /home/allen/projects/osgPPU/src/osgPPU/Unit.cpp:17:
/home/allen/projects/osgPPU/include/osgPPU/Unit.h: In member function ‘void 
osgPPU::Unit::popFrameBufferObject(osg::State)’:
/home/allen/projects/osgPPU/include/osgPPU/Unit.h:311: error: ‘class 
osg::FBOExtensions’ has no member named ‘glBindFramebuffer’


Names of the member functions in the FBOExtensions class changed on trunk after 
the 2.8.2 release. OSG 2.8.3 was released off the 2.8 branch and is 99.9% API 
compatible with OSG 2.8.2. The FBOExtensions name changes are not in 2.8.3. It 
looks to me like trunk of osgPPU is tracking trunk of OSG (which I would expect).


Art and I discussed osgPPU and the 2.8.3 release previously. If you check the 
archives, I believe you'll find a post from me stating that the same version of 
osgPPU that worked with 2.8.2 should also work with 2.8.3.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] dxf Plugin

2010-04-21 Thread Joachim Pouderoux
Hi,

I have another bugfix for the dxf plugin to report.

File dxfEntity.cpp:531

Code:

VList::iterator itr = nlist.begin();
Vec3d lastn = (*itr++);
double bad_c = 0;
double good_c = 0;
long bad=0,good=0;
for (; itr != nlist.end(); ) {
++itr;
if ((*itr)== lastn) continue;
...
}




itr is incremented into the loop and after the test with nlist.end(). The 
unreferencing of itr when nlist is equals to nlist.end() cause an application 
crash.

I suggest to replace the loop by 

Code:

for (; itr != nlist.end(); ++itr) {
if ((*itr)== lastn) continue;
...
}




Cheers,
Joachim[/code]

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





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


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Art Tevs
Hi Allen,

hmm, very strange, current osgPPU version compiles against osg 2.9.8 which is 
the developer version number of 2.8.3 branch, as I think.

The compilation error is about include files, did you checked that osg 2.8.3 
also has reinstalled your include files. 

I will check this today or tomorrow. It could be that there is an API 
difference between 2.9.8 and 2.8.3 branch. I'll check it.


Cheers,
Art

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





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


Re: [osg-users] About osg::OcclusionQueryNode

2010-04-21 Thread Paul Martz

Jean-Sébastien Guay wrote:
The osgocclusionquery example has a visitor that will only insert OQNs 
when the vertex count of children exceeds a threshold (5000 by default) 
but I wanted the control to place it where I want, because if I have a 
graph with 2 children, one with 5010 vertices and one with 4000, then 
with the visitor I would get an OQN above the first child but not the 
second, whereas I want an OQN above both (above their parent).


Yes, that visitor is pretty crude. I have not found an easy way to place OQNs 
programmatically in an arbitrary scene graph and get optimal performance 
results. The best approach, as you are doing, is to have a priori knowledge of 
the model, and educated modelers that know the most effective locations for 
placing OQNs. (The problem is identical to placing OccluderNode, OSG's other 
occlusion mechanism.)


Good solution, using a configuration file. Do I assume correctly that you have a 
configuration file per model?


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Art Tevs
Ok, then it explains why it does not compile. Yes, svn trunk of osgPPU tracks 
the svn trunk of OSG. 

Hmm, I wonder how to handle different osg branches in future. I mean if again 
something like this happens, then I had either to create additional branch in 
osgPPU repository to track with the according osg branch (which I didn't really 
like) or to detect the version and write preprocessor or cmake workarounds for 
that (which is also not a good solution).

Paul do you have any ideas on that?

For this release I will go for a preprocessor solution, I think. Since I am not 
sure if I am ready to tag already new version of osgPPU, since I want to check 
it before tagging.

cheers,
art

P.S. Allen, I think, I should have the changes tomorrow.



Paul Martz wrote:
 Allen Saucier wrote:
 Names of the member functions in the FBOExtensions class changed on trunk 
 after 
 the 2.8.2 release. OSG 2.8.3 was released off the 2.8 branch and is 99.9% API 
 compatible with OSG 2.8.2. The FBOExtensions name changes are not in 2.8.3. 
 It 
 looks to me like trunk of osgPPU is tracking trunk of OSG (which I would 
 expect).
 
 Art and I discussed osgPPU and the 2.8.3 release previously. If you check the 
 archives, I believe you'll find a post from me stating that the same version 
 of 
 osgPPU that worked with 2.8.2 should also work with 2.8.3.
 
 -- 
 -Paul Martz  Skew Matrix Software
 http://www.skew-matrix.com/
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] About osg::OcclusionQueryNode

2010-04-21 Thread Jean-Sébastien Guay

Hi Paul,


Good solution, using a configuration file. Do I assume correctly that
you have a configuration file per model?


Yes. It's optional, of course. If it's there, then it will apply its 
contents (shaders, textures, tangent space coords, now occlusion query 
nodes) on either the root of the model or a list of named nodes in the 
model. One config file can apply settings to many child nodes, so it 
could apply one shader to the root of the model, then a different one to 
a child.


Not very sophisticated, but it works well enough. The problem as you 
said becomes education, because lots of things are under user control. 
If people start putting a different shader on every node in all models 
then performance becomes really bad and they come to see me to ask 
why... ;-)


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Allen Saucier
Gentlemen, thank you.

Now I understand.  But, I still have an issue.  I downloaded osg 2.8.3 from the 
Osg website
as shown in the attached pic 1.  I used the svn link as shown.  Is this link 
the trunk of osg 2.8.3?  Or a branch?  i can not tell.

I did the same with osgPPU. pic 2

From my perspective as an end-user, I do not seen anything that tells me that 
there is a branch version that is different from a trunk version.  I have been 
assuming this entire time that both the svn versions of osg and osgPPU are 
the two version which are compatible with each other, as Art has been telling 
me.  And I have used the svn versions as listed on each website with no 
success.

I am still missing something.  Can you please clear up my confusion?

thanks,
Allen

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




Attachments: 
http://forum.openscenegraph.org//files/screenshot2_903.png
http://forum.openscenegraph.org//files/screenshot1_210.png


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


Re: [osg-users] CityGML

2010-04-21 Thread Joachim Pouderoux
Hi,

I have coded a CityGML reader for OSG ! It successfully parses all geometry, 
material (color  texture) of CityGM 0.3-1.0 samples available on the offical 
CityGML website.
The reader is based on a small library (4 files) I developed which is 
independent of osg. I should submit the code of both the lib  the reader soon! 
Stay tuned :)

Cheers,
Joachim

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





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


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Mourad Boufarguine
Hi Allen,

http://www.openscenegraph.org/projects/osg/wiki/Downloads

You are using the svn of the 2.8 branch (stable release). The trunk is a
developer release (at the end of the web page). To get svn trunk of osg,
check this link :

http://www.openscenegraph.org/projects/osg/wiki/Downloads/SVN

http://www.openscenegraph.org/projects/osg/wiki/Downloads/SVNMourad




On Wed, Apr 21, 2010 at 9:54 PM, Allen Saucier allen.sauc...@itt.comwrote:

 Gentlemen, thank you.

 Now I understand.  But, I still have an issue.  I downloaded osg 2.8.3 from
 the Osg website
 as shown in the attached pic 1.  I used the svn link as shown.  Is this
 link the trunk of osg 2.8.3?  Or a branch?  i can not tell.

 I did the same with osgPPU. pic 2

 From my perspective as an end-user, I do not seen anything that tells me
 that there is a branch version that is different from a trunk version.  I
 have been assuming this entire time that both the svn versions of osg and
 osgPPU are the two version which are compatible with each other, as Art has
 been telling me.  And I have used the svn versions as listed on each website
 with no success.

 I am still missing something.  Can you please clear up my confusion?

 thanks,
 Allen

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




 Attachments:
 http://forum.openscenegraph.org//files/screenshot2_903.png
 http://forum.openscenegraph.org//files/screenshot1_210.png


 ___
 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] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Paul Martz

Art Tevs wrote:
Ok, then it explains why it does not compile. Yes, svn trunk of osgPPU tracks the svn trunk of OSG. 


Hmm, I wonder how to handle different osg branches in future. I mean if again 
something like this happens, then I had either to create additional branch in 
osgPPU repository to track with the according osg branch (which I didn't really 
like) or to detect the version and write preprocessor or cmake workarounds for 
that (which is also not a good solution).


I'm not sure what new problem OSG 2.8.3 has created for osgPPU that didn't 
already exist with the OSG 2.8.2 release. Can you explain the problem?


The same version of osgPPU that works with 2.8.2 should also work with 2.8.3. 
osgPPU trunk is broke with OSG 2.8.3, but it was also broke with OSG 2.8.2.


Suppose the 2.8.3 release never happened, and Allen was trying to build svn 
trunk of osgPPU with the OSG 2.8.2 release. That would also not work, right? 
What would you tell him to do in that case? The same answer should apply to 2.8.3.



For this release I will go for a preprocessor solution, I think.


My external projects osgWorks and osgBullet are compatible with OSG 2.6.1 and 
later. osgWorks contains version-specific code in only two places (to handle the 
OSG API changes in Registry and Traits that occurred in OSG 2.6.0 and 2.8.0 
respectively). And osgBullet contains no version-specific code at all; all 
osgBullet code is 100% compatible with OSG 2.6.1 and later.


So, my use of the C preprocessor for OSG compatibility is very infrequent and is 
not a problem in itself. However, testing on different versions can be a burden 
to external project managers, and that's a decision you have to make.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Paul Martz

Allen Saucier wrote:

http://forum.openscenegraph.org//files/screenshot2_903.png


The statement in this image implies that svn trunk of osgPPU is compatible with 
the latest stable release of OSG. This is not correct.


It looks like the osgPPU 0.4 tag should be compatible with OSG 2.8.x. Maybe Art 
can comment on version compatibility?


(A compatibility matrix might be useful, sort of like what I have done with 
osgBullet:

http://code.google.com/p/osgbullet/wiki/CompatibilityMatrix
)

--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CityGML

2010-04-21 Thread Tomlinson, Gordon
Very cool, will save some work

Gordon Tomlinson
Product Manager 3d Technology  Project Wyvern
Overwatch(r)
An Operating Unit of Textron Systems
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Joachim
Pouderoux
Sent: Wednesday, April 21, 2010 4:08 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] CityGML

Hi,

I have coded a CityGML reader for OSG ! It successfully parses all
geometry, material (color  texture) of CityGM 0.3-1.0 samples available
on the offical CityGML website.
The reader is based on a small library (4 files) I developed which is
independent of osg. I should submit the code of both the lib  the
reader soon! Stay tuned :)

Cheers,
Joachim

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





___
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] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Jean-Sébastien Guay

Hi Art, Paul,


My external projects osgWorks and osgBullet are compatible with OSG
2.6.1 and later. osgWorks contains version-specific code in only two
places (to handle the OSG API changes in Registry and Traits that
occurred in OSG 2.6.0 and 2.8.0 respectively). And osgBullet contains no
version-specific code at all; all osgBullet code is 100% compatible with
OSG 2.6.1 and later.

So, my use of the C preprocessor for OSG compatibility is very
infrequent and is not a problem in itself. However, testing on different
versions can be a burden to external project managers, and that's a
decision you have to make.


Just to chime in with another data point, we generally want to keep our 
OSG graphics integration compatible with at least two generations of OSG 
(currently 2.6.x and 2.8.x), but in general we're compatible across the 
whole spectrum from 2.2 on (some features are not usable on such old 
versions but they're disabled by compile-time checks). We might be 
compatible with 2.0 as well, we just never checked (we moved from 1.2 to 
2.2 directly).


We use the OSG_VERSION_GREATER_OR_EQUAL and OSG_VERSION_LESS_THAN macros 
in some places, mostly where we derived a class to work around a bug we 
found in a given version of OSG, and also submitted the fix to the base 
osg:: class in parallel, so the next stable version contains the fix and 
doesn't need the derived class anymore. But they're used only 
sporadically, and the code is still very manageable and clear.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Art Tevs
Hi Paul,

you are right, current svn trunk of osgPPU is not compatible with osg 2.8.3, 
thats true. But what I mean is what should external project developers do, if 
there is a branch with different API in the osg svn repository?

For example, current osg developer version is 2.9.8 which is not compatible to 
2.8.3. The version 2.8.3 came right a weak ago or so. The 2.9.8 and 2.9.7 osg 
versions exists longer than the 2.8.3 version. So as for my project I try to be 
compatible to the most youngest osg version. In this case this is the developer 
version in the trunk. 

However if some time ago there was a split into another branch it might became 
painful to have an external NodeKit compatible with all official osg branches 
that exists. I mean 2.8.3 is based on 2.8, so between 2.8 and 2.9 there was an 
API change, this is ok. However both versions 2.8.3 and 2.9.x were maintained 
in parallel. So for NodeKit developers this would mean we have to take care 
also on osg branches in our trunks, which might became painful. Therefor I just 
asked, which kind of solutions there might exists. 

But, ok, never mind, I will try to come up now with a solution to have the best 
of both worlds, new features and compatible API to the official stable release. 

art

P.S. On the osgPPU webpage there is a compatiblity list given. So, currently no 
stable realase exists for the newest osg stable release, but this will change 
in the next days ;)


Thank you!

Cheers,
Art

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





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


Re: [osg-users] [osgPPU] Can't compile svn version of osgPPU against osg 2.8.3

2010-04-21 Thread Paul Martz

Art Tevs wrote:
However if some time ago there was a split into another branch it might became painful to have an external NodeKit compatible with all official osg branches that exists. I mean 2.8.3 is based on 2.8, so between 2.8 and 2.9 there was an API change, this is ok. However both versions 2.8.3 and 2.9.x were maintained in parallel. So for NodeKit developers this would mean we have to take care also on osg branches in our trunks, which might became painful. Therefor I just asked, which kind of solutions there might exists. 


I, for one, would not expect any version of osgPPU to be compatible with OSG 
2.8.3 other than the same version of osgPPU that was compatible with 2.8.2. I 
think users should be able to use the same version of osgPPU and simply upgrade 
OSG from 2.8.2 to 2.8.3 to get the new plugins in 2.8.3. (But they will probably 
need to rebuild osgPPU because 2.8.3 is not binary compatible with 2.8.2.)


But, ok, never mind, I will try to come up now with a solution to have the best of both worlds, new features and compatible API to the official stable release. 


If you want to maintain compatibility with 2.8.x on osgPPU svn trunk, then that 
is certainly possible, and a worthy goal, but (in my opinion) it is entirely 
optional and not required for you to do so, because you already have a tagged 
osgPPU release that is compatible with OSG 2.8.x.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Anybody interested in a Keyframe Capturer?

2010-04-21 Thread Nick Schultz
Hi there,

Not sure if there is similar function already in OSG, but I had the need of 
being able to capture specific Camera position keyframes so I can use them to 
create a video.  Before this capturer, they way I accomplished this was I 
enabled the Animation path Recorder, positioned my camera to particular point, 
waited bout 20 seconds, and then continued to my next keyframe.  When I was 
done, I then went to animation.path file and picked out the keyframes that had 
repeated several times (because i waited for about 20 seconds), I then modified 
the timings of these keyframes to get the desired flyover speed.  

I later smoothed the flyover by importing the points into Matlab and used cubic 
splines to create a keyframe for every single frame.  

This process took awhile, and was quite annoying having to sift through 
unwanted keyframes generated by the animation path recorder. 

So I created my own Handler called KeyframeCapturerHandler that acts almost 
exactly as RecordCameraPathHandler, infact most of the code was copied from 
it.  Instead of capturing a keyframe at a timed interval, I only capture a 
keyframe when I'm ready and press a key.  

So far, it has done exactly what I needed it to do and has saved me time and 
frustration.  I still have to do my interpolation step, but capturing the 
inital keyframes is much easier.

Does this sound like a useful feature that any of you would want to use?  Is 
there already a way to do this without my handler?

Thanks,

Nick

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





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


Re: [osg-users] CityGML

2010-04-21 Thread Rafa Gaitan
Wow! great work Joachim!.

Rafa.

2010/4/21 Tomlinson, Gordon gtomlin...@overwatch.textron.com:
 Very cool, will save some work

 Gordon Tomlinson
 Product Manager 3d Technology  Project Wyvern
 Overwatch(r)
 An Operating Unit of Textron Systems
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Joachim
 Pouderoux
 Sent: Wednesday, April 21, 2010 4:08 PM
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] CityGML

 Hi,

 I have coded a CityGML reader for OSG ! It successfully parses all
 geometry, material (color  texture) of CityGM 0.3-1.0 samples available
 on the offical CityGML website.
 The reader is based on a small library (4 files) I developed which is
 independent of osg. I should submit the code of both the lib  the
 reader soon! Stay tuned :)

 Cheers,
 Joachim

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





 ___
 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




-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
http://gvsig3d.blogspot.com
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Anybody interested in a Keyframe Capturer?

2010-04-21 Thread Torben Dannhauer
Hi Nick,

sounds interesting! You can try to implement your interpolation step also in 
c++. Ask google, e.g. http://www.alglib.net/interpolation/spline3.php


Cheers,
Torben

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





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