Re: [osg-users] VBO's - lifetime.

2009-11-27 Thread Robert Osfield
Hi Nico,

I have just checked in the implementation of the GL object clean up,
and all the debug messages are now quieten down/removed so the code
should be good to go for real application work now.

Please let me know if you still see problems.
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VBO's - lifetime.

2009-11-27 Thread Nico Kruithof
Hi Robert,

Everything works fine now. Thanks a lot for investigating this problem.

-- Nico


On Fri, Nov 27, 2009 at 12:49 PM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi Nico,

 I have just checked in the implementation of the GL object clean up,
 and all the debug messages are now quieten down/removed so the code
 should be good to go for real application work now.

 Please let me know if you still see problems.
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
Hi Nico,

osgcamera -r Tetra.osg is failing due to issue with clean up of the
buffer object pool.  I have already tracked down a bug in the clean up
of the texture object pool, and found the same problem in the buffer
object pool and applied the same fix, but alas still the problem
persists so there must be other problems lurking in the clean up of
the buffer object code as well.

I'll keep plugging away at it today.

Robert.

On Wed, Nov 25, 2009 at 8:06 PM, Nico Kruithof nicokruit...@gmail.com wrote:
 Hi Robert,
 Not too much good news I'm afraid. I tried my application and the osgcamera.
 I have to stop now. I might have some time to test tomorrow night (it's a
 private project for now).
 I attached the model I'm using. It loads fine in my application, but crashes
 when I close it. The osgcamera doesn't work either:
 osgcamerad.exe d:\tetra.osg
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 osgcamerad.exe -j 3 d:\tetra.osg
 + New viewer 
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
 GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 and crashes after the first viewer.
 I wrote down the callstack when the crash occurs in my application:
 void BufferObject::releaseGLObjects(State* state) const, with state == 0
 void GLBufferObject::releaseGLBufferObject(unsigned int contextID,
 GLBufferObject* to), with contextID==0
 void GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to)
 void GLBufferObjectSet::orphan(GLBufferObject* to)
 The osgcamera example with the slider doesn't work either. Again, the output
 is correct for the first renderer, but not for the second and third. Here is
 the output again:
 osgcamerad.exe -r 3 d:\glider.osg
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 osgcamerad.exe -r 3 --vbo d:\glider.osg
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
 GLBufferObjectSet::GLBufferObjectSet _profile._size=640
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Warning: detected OpenGL error 'invalid value' at After Renderer::compile
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Warning: detected OpenGL error 'invalid value' at After Renderer::compile
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0

 osgcamerad.exe -r 3 --vbo --shared d:\glider.osg
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 Enabling VBO
 + New viewer 
 GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
 GLBufferObjectSet::GLBufferObjectSet _profile._size=640
  Viewer ended --
 Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
 Texture::TextureObjectManager::discardAllDeletedTextureObjects()
 _contextID=0 _numActiveTextureObjects=0
 + New viewer 
  Viewer ended --
 

Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
Hi Nico,

I've tracked down issues with both the clean up of the texture object
pool and buffer object pool that has required introduction of some new
methods for cleanup.  I have checked into svn/trunk the initial cut of
this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
well as a range of other test models.

The new code is only provisional though - it outputs lots of debug
info the console, and isn't yet tidied up and completed, it is
however, far enough along to warrant wider testing.  Could you check
out OSG svn/trunk and then test this against your app and let me know
how you get on.

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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Sure, I'll do that tonight. Thanks a lot for looking into this.

-- Nico

On Thu, Nov 26, 2009 at 1:36 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nico,

 I've tracked down issues with both the clean up of the texture object
 pool and buffer object pool that has required introduction of some new
 methods for cleanup.  I have checked into svn/trunk the initial cut of
 this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
 well as a range of other test models.

 The new code is only provisional though - it outputs lots of debug
 info the console, and isn't yet tidied up and completed, it is
 however, far enough along to warrant wider testing.  Could you check
 out OSG svn/trunk and then test this against your app and let me know
 how you get on.

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

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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Hi Robert,

Perfect! My application works exits normally again. The glider works as
well. Only the tetra file didn't. It crashes after the first viewer.

osgcamerad.exe -j 3 d:\tetra.osg:

Warning: Could not find plugin to read objects from file 3.
GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
Constucting BufferObject 01F1AD18
GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
Constucting BufferObject 01F1AC98
GLBufferObjectSet::deleteAllGLBufferObjects() not implemented yet.
GLBufferObjectSet::deleteAllGLBufferObjects() not implemented yet.
Texture::TextureObjectManager::deleteAllTextureObjects() _contextID=0
GLBufferObjectSet::discardAllGLBufferObjects()
Destucting BufferObject 01F1AD18
GLBufferObjectSet::discardAllGLBufferObjects()
Destucting BufferObject 01F1AC98
Texture::TextureObjectManager::discardAllTextureObjects() _contextID=0
_numActiveTextureObjects=0
BufferObject::releaseGLObjects()
BufferObject::releaseGLObjects()
BufferObject::releaseGLObjects()

-- Nico

On Thu, Nov 26, 2009 at 1:57 PM, Nico Kruithof nicokruit...@gmail.comwrote:

 Sure, I'll do that tonight. Thanks a lot for looking into this.

 -- Nico


 On Thu, Nov 26, 2009 at 1:36 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nico,

 I've tracked down issues with both the clean up of the texture object
 pool and buffer object pool that has required introduction of some new
 methods for cleanup.  I have checked into svn/trunk the initial cut of
 this code, it enables osgcamera -r 5 tetra.osg to work just fine, as
 well as a range of other test models.

 The new code is only provisional though - it outputs lots of debug
 info the console, and isn't yet tidied up and completed, it is
 however, far enough along to warrant wider testing.  Could you check
 out OSG svn/trunk and then test this against your app and let me know
 how you get on.

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



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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Robert Osfield
HI Nico,

On Thu, Nov 26, 2009 at 5:16 PM, Nico Kruithof nicokruit...@gmail.com wrote:
 Hi Robert,
 Perfect! My application works exits normally again. The glider works as
 well. Only the tetra file didn't. It crashes after the first viewer.

So you still have a crash with tetra.osg then?  FYI, I've made a
couple of other fixes this afternoon, but the code isn't ready to
integrate yet.  I can't say whether it will fix anything more for you
as the tetra.osg model has been working fine since my fixes I checked
in this morning and notified you about.

 osgcamerad.exe -j 3 d:\tetra.osg:
 Warning: Could not find plugin to read objects from file 3.

The -j option is not valid, trying using -r for repeat ;-)


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


Re: [osg-users] VBO's - lifetime.

2009-11-26 Thread Nico Kruithof
Aargh. Yes, -r it was. I'll try this tonight or tomorrow.

Nico

On Thu, Nov 26, 2009 at 7:12 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 HI Nico,

 On Thu, Nov 26, 2009 at 5:16 PM, Nico Kruithof nicokruit...@gmail.com
 wrote:
  Hi Robert,
  Perfect! My application works exits normally again. The glider works as
  well. Only the tetra file didn't. It crashes after the first viewer.

 So you still have a crash with tetra.osg then?  FYI, I've made a
 couple of other fixes this afternoon, but the code isn't ready to
 integrate yet.  I can't say whether it will fix anything more for you
 as the tetra.osg model has been working fine since my fixes I checked
 in this morning and notified you about.

  osgcamerad.exe -j 3 d:\tetra.osg:
  Warning: Could not find plugin to read objects from file 3.

 The -j option is not valid, trying using -r for repeat ;-)


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

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


Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Robert Osfield
HI Nico,

This is clearly a bug, as it certainly shouldn't crash with this type
of usage.  I will be investigating various bugs today and will have a
look at this one as well.

Which platform are you working on?
Robert.

On Tue, Nov 24, 2009 at 8:18 PM, Nico Kruithof n...@nghk.nl wrote:
 Hello,
 When a node with VBO's enabled outlives the lifetime of it's renderer, I get
 an access violation in GLBufferObjectSet::orphan when I try to destroy the
 node. I tried to write down the scenario:
 using namespace osg;
 ref_ptrNode node(new Node);
 ref_ptrGeometry geom(new osg::Geometry);
 // ... fill geom
 geom-setUseVertexBufferObjects(true);
 node-addDrawable(geom.get());
 {
   ref_ptrosgViewer::Viewer viewer(new osgViewer::Viewer());
   viewer-setSceneData(node);
   viewer-frame();
   // render for a while
   viewer = NULL; // The viewer is destroyed here
 }
 node = NULL; // This gives the access violation.

 Now if I don't set geom-setUseVertexBufferObjects(true); everything works
 fine. Do you still need a valid render context or a valid viewer to be able
 to clean up the VBO's?
 Nico
 ___
 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] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Hi Robert,

I used windows vista 64 and 32. It happens with an up to date trunk and I
didn't have the problem with a previous version. I don't know the revision I
used to use, was probably before your openGL ES work.

Thanks for looking into this.
-- Nico


On Wed, Nov 25, 2009 at 10:47 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 HI Nico,

 This is clearly a bug, as it certainly shouldn't crash with this type
 of usage.  I will be investigating various bugs today and will have a
 look at this one as well.

 Which platform are you working on?
 Robert.

 On Tue, Nov 24, 2009 at 8:18 PM, Nico Kruithof n...@nghk.nl wrote:
  Hello,
  When a node with VBO's enabled outlives the lifetime of it's renderer, I
 get
  an access violation in GLBufferObjectSet::orphan when I try to destroy
 the
  node. I tried to write down the scenario:
  using namespace osg;
  ref_ptrNode node(new Node);
  ref_ptrGeometry geom(new osg::Geometry);
  // ... fill geom
  geom-setUseVertexBufferObjects(true);
  node-addDrawable(geom.get());
  {
ref_ptrosgViewer::Viewer viewer(new osgViewer::Viewer());
viewer-setSceneData(node);
viewer-frame();
// render for a while
viewer = NULL; // The viewer is destroyed here
  }
  node = NULL; // This gives the access violation.
 
  Now if I don't set geom-setUseVertexBufferObjects(true); everything
 works
  fine. Do you still need a valid render context or a valid viewer to be
 able
  to clean up the VBO's?
  Nico
  ___
  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] VBO's - lifetime.

2009-11-25 Thread Robert Osfield
Hi Nico,

On Wed, Nov 25, 2009 at 10:07 AM, Nico Kruithof nicokruit...@gmail.com wrote:
 I used windows vista 64 and 32. It happens with an up to date trunk and I
 didn't have the problem with a previous version. I don't know the revision I
 used to use, was probably before your openGL ES work.

Back in September I introduced a new backend for gl buffer and texture
objects, this provides gl object pools to help keep a lid on GL memory
usage.  It was an almost complete rewrite so regressions like this
likely while the code bed downs.  The upside is that the new code
fixed quite a few bugs that existed before, so it's not all bad :-)

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


Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Robert,

My response wasn't meant to emphasize that things got broken, just to give
you as detailed information as possible. I really do appreciate all the work
you put in OSG. If there is any way I could help / test let me know.

-- Nico

On Wed, Nov 25, 2009 at 11:21 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi Nico,

 On Wed, Nov 25, 2009 at 10:07 AM, Nico Kruithof nicokruit...@gmail.com
 wrote:
  I used windows vista 64 and 32. It happens with an up to date trunk and I
  didn't have the problem with a previous version. I don't know the
 revision I
  used to use, was probably before your openGL ES work.

 Back in September I introduced a new backend for gl buffer and texture
 objects, this provides gl object pools to help keep a lid on GL memory
 usage.  It was an almost complete rewrite so regressions like this
 likely while the code bed downs.  The upside is that the new code
 fixed quite a few bugs that existed before, so it's not all bad :-)

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

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


Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Robert Osfield
Hio Nico,

I've attempted to reproduce the cash using a scene graph that I force
to use VBO's, and the run the viewer for a frame() or run() then
destruct the viewer, then the scene graph - along the lines of your
code fragment, but it runs reliable on my Kubuntu 9.04 64bit system
with svn/trunk.

Here's lies the problem with using code fragments - I just don't know
if it you did something different in your code to what I've put
together and this accounts for the difference we are seeing, or
whether it's just thread timing/unitialized variable/different
OS/different compiler/different rev of the OSG.  Compilable examples
that can be tried on both systems eradicate many of the variables as
to the cause of the problems, I know this is more work, but it's far
quicker for trying to isolate bugs.

Until I can reproduce the problem there isn't too much I can do at my
end.  What I'll now do is look at J.P. example to see if that help
track down one or more of the problems with the VBO clean up.  Whether
any solution to J.P's observed problems will address the one you are
observing I can't say without being able to reproduce your problem.

Robert.

On Tue, Nov 24, 2009 at 8:18 PM, Nico Kruithof n...@nghk.nl wrote:
 Hello,
 When a node with VBO's enabled outlives the lifetime of it's renderer, I get
 an access violation in GLBufferObjectSet::orphan when I try to destroy the
 node. I tried to write down the scenario:
 using namespace osg;
 ref_ptrNode node(new Node);
 ref_ptrGeometry geom(new osg::Geometry);
 // ... fill geom
 geom-setUseVertexBufferObjects(true);
 node-addDrawable(geom.get());
 {
   ref_ptrosgViewer::Viewer viewer(new osgViewer::Viewer());
   viewer-setSceneData(node);
   viewer-frame();
   // render for a while
   viewer = NULL; // The viewer is destroyed here
 }
 node = NULL; // This gives the access violation.

 Now if I don't set geom-setUseVertexBufferObjects(true); everything works
 fine. Do you still need a valid render context or a valid viewer to be able
 to clean up the VBO's?
 Nico
 ___
 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] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Ok, thanks for looking into it. I'll make a simple compiling program that
causes the crash. I extracted the code snippet from my own program. I will
check the example under ubuntu as well.

Nico

On Wed, Nov 25, 2009 at 3:25 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hio Nico,

 I've attempted to reproduce the cash using a scene graph that I force
 to use VBO's, and the run the viewer for a frame() or run() then
 destruct the viewer, then the scene graph - along the lines of your
 code fragment, but it runs reliable on my Kubuntu 9.04 64bit system
 with svn/trunk.

 Here's lies the problem with using code fragments - I just don't know
 if it you did something different in your code to what I've put
 together and this accounts for the difference we are seeing, or
 whether it's just thread timing/unitialized variable/different
 OS/different compiler/different rev of the OSG.  Compilable examples
 that can be tried on both systems eradicate many of the variables as
 to the cause of the problems, I know this is more work, but it's far
 quicker for trying to isolate bugs.

 Until I can reproduce the problem there isn't too much I can do at my
 end.  What I'll now do is look at J.P. example to see if that help
 track down one or more of the problems with the VBO clean up.  Whether
 any solution to J.P's observed problems will address the one you are
 observing I can't say without being able to reproduce your problem.

 Robert.

 On Tue, Nov 24, 2009 at 8:18 PM, Nico Kruithof n...@nghk.nl wrote:
  Hello,
  When a node with VBO's enabled outlives the lifetime of it's renderer, I
 get
  an access violation in GLBufferObjectSet::orphan when I try to destroy
 the
  node. I tried to write down the scenario:
  using namespace osg;
  ref_ptrNode node(new Node);
  ref_ptrGeometry geom(new osg::Geometry);
  // ... fill geom
  geom-setUseVertexBufferObjects(true);
  node-addDrawable(geom.get());
  {
ref_ptrosgViewer::Viewer viewer(new osgViewer::Viewer());
viewer-setSceneData(node);
viewer-frame();
// render for a while
viewer = NULL; // The viewer is destroyed here
  }
  node = NULL; // This gives the access violation.
 
  Now if I don't set geom-setUseVertexBufferObjects(true); everything
 works
  fine. Do you still need a valid render context or a valid viewer to be
 able
  to clean up the VBO's?
  Nico
  ___
  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] VBO's - lifetime.

2009-11-25 Thread Robert Osfield
Hi Nico,

I've now modified the osgcamera example so that it can be used as
tested bed for repeated construction of viewers and enabling of VBO's.
 The example is now checked into svn/trunk, could you please try it
out on your system and see what errors you can pick up.  Try the
following command line:

osgcamera -r 3 glider.osg

And:

   osgcamera -r 3 --vbo glider.osg

You can also try (which loads once and then shares the model between viewers):

   osgcamera -r 3 --vbo --shared glider.osg

Press escape each time the view comes up to close the viewer and move
on to the next one.

With the first command line I get no errors, and the glider comes up
correctly each time.  When enabling VBO's with --vbo I get the correct
model on the first frame, and on the two following viewers nothing
comes up and I get errors, the output to the console I've copied in
below.  Adding the --shared doesn't have any effect.

The good news is that I am getting GL errors which suggests that the
VBO pool isn't being cleaned up or initialized correctly for the new
contexts.  There is chance that this will result in crash on your
system, but only GL errors on mine.  Could you please test osgcamera
as above to see.

Cheers,
Robert.

+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
GLBufferObjectSet::GLBufferObjectSet _profile._size=640
 Viewer ended --

+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
 Viewer ended --

+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of memory' at after RenderBin::draw(..)
Warning: detected OpenGL error 'out of 

Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Hi Robert,

The first call (no --vbo) runs correctly. The second and third (with --vbo)
do not crash, but the second and third screen are wrong. I also tried the
fourth combination osgcamera -r 3 --shared glider.osg. That one worked
fine.

-- Nico

This is the output:

osgcamera -r 3 glider.osg
+ New viewer 
 Viewer ended --

+ New viewer 
 Viewer ended --

+ New viewer 
 Viewer ended --

osgcamera -r 3 --vbo glider.osg
+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
GLBufferObjectSet::GLBufferObjectSet _profile._size=640
 Viewer ended --

+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
 Viewer ended --

+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
 Viewer ended --

osgcamera -r 3 --vbo --shared glider.osg
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
+ New viewer 
GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
GLBufferObjectSet::GLBufferObjectSet _profile._size=640
 Viewer ended --

+ New viewer 
 Viewer ended --

+ New viewer 
 Viewer ended --
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Hi Robert,

I realised that another difference is that I'm using the static viewer. I'll
try the texture patch, however the model I constructed didn't contain any
textures. Just vertices, normals and triangles.

-- Nico

On Wed, Nov 25, 2009 at 8:08 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nico,

 I have made a provisional fix to src/osg/Texture.cpp, this fixes the
 osgcamera runs, but I'm still testing the code so won't check the fix
 in yet.

 Could you please try the attached src/osg/Texture.cpp and see if it
 fixes the problems you are seeing at your end.

 Robert.

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


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


Re: [osg-users] VBO's - lifetime.

2009-11-25 Thread Nico Kruithof
Hi Robert,

Not too much good news I'm afraid. I tried my application and the osgcamera.
I have to stop now. I might have some time to test tomorrow night (it's a
private project for now).

I attached the model I'm using. It loads fine in my application, but crashes
when I close it. The osgcamera doesn't work either:

osgcamerad.exe d:\tetra.osg
GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0

osgcamerad.exe -j 3 d:\tetra.osg
+ New viewer 
GLBufferObjectSet::GLBufferObjectSet _profile._size=5248
GLBufferObjectSet::GLBufferObjectSet _profile._size=5184
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 

and crashes after the first viewer.

I wrote down the callstack when the crash occurs in my application:
void BufferObject::releaseGLObjects(State* state) const, with state == 0
void GLBufferObject::releaseGLBufferObject(unsigned int contextID,
GLBufferObject* to), with contextID==0
void GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to)
void GLBufferObjectSet::orphan(GLBufferObject* to)

The osgcamera example with the slider doesn't work either. Again, the output
is correct for the first renderer, but not for the second and third. Here is
the output again:
osgcamerad.exe -r 3 d:\glider.osg
+ New viewer 
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0

osgcamerad.exe -r 3 --vbo d:\glider.osg
+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
GLBufferObjectSet::GLBufferObjectSet _profile._size=640
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Warning: detected OpenGL error 'invalid value' at After Renderer::compile
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0


osgcamerad.exe -r 3 --vbo --shared d:\glider.osg
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
Enabling VBO
+ New viewer 
GLBufferObjectSet::GLBufferObjectSet _profile._size=13120
GLBufferObjectSet::GLBufferObjectSet _profile._size=640
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0
+ New viewer 
 Viewer ended --

Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID=0
Texture::TextureObjectManager::discardAllDeletedTextureObjects()
_contextID=0 _numActiveTextureObjects=0


tetra.osg
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org