Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-12-01 Thread J.P. Delport

Hi Robert,

Robert Osfield wrote:

Hi J.P et. al,

I've completed my work on clean up of texture objects and buffer
objects and have checked this work into snv/trunk.   I've done a range
of tests where the viewer is constructed and destructed repeated, when
handling a range of models and everything now loads correctly on all
viewer instances.

I now need others to test testing there own applications and data to
make sure all usage models are now safely handled. Fingers crossed the
problems we've seen should now be solved.


I've tested our application that was giving problems and it seems to be 
fixed now. Thanks for the effort in tracking down  fixing this.


regards
jp



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



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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-26 Thread Robert Osfield
Hi J.P,

I have done a lot more investigation in the context clean up issues
and have checked in a provisional fix for the issues.  Could you
please do an svn update and then test against your own applications to
see if things are fixed.

The code I've just checked in still has lots of debug info in place,
and I haven't completed all parts of the work, through this afternoon
I'll work on cleaning it up, but right now it should in a good enough
state to test out.  Could you do this against your app and let me know
how you get on.

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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Robert Osfield
Hi J.P.

Thanks fort he test app + data, I'll look into this today.  My guess
is that the issue will be close related to the crash that Nico has
reported.

Robert.

On Wed, Nov 25, 2009 at 8:28 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Robert, J-S,

 the results of my most recent tests:

 With old texture pool (#define USE_NEW_TEXTURE_POOL 1 commented out):

 ./test cow.osg - All OK

 ./test earth_sphere_dt1.ive - All OK (see model attached)

 ./test earth.ive - sometimes corrupted model and textures, sometimes
 segfault, looks like reading bogus data from the GPU (I used the top level
 file from www.openscenegraph.org/data/earth_bayarea/earth.ive)

 With new texture pool:

 ./test cow.osg - All OK

 ./test earth_sphere_dt1.ive - textures missing on second viewer start, get
 warning:
 Warning: detected OpenGL error 'invalid operation' at After
 Renderer::compile

 ./test earth.ive - segfault or corrupted display.

 Latest test app also attached. I've tried to switch off unref of images
 after apply, hope it worked.

 regards
 jp

 J.P. Delport wrote:

 Hi J-S,

 Jean-Sébastien Guay wrote:

 Hi again,

 I haven't had a chance to check your code yet, give me a few minutes and
 I'll check if there's anything amiss that I can see.

 I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN
 head. But it seems that you've pinned it down to the texture pool as I
 thought, though it would seem to be OS specific? A bit weird.

 Sorry I couldn't help more.

 can you try with terrain as the parameter to the test app. For me this
 still fails on the second creation of the viewer. When zooming into the
 terrain the newly loaded textures are OK though.

 jp


 J-S


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

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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Robert Osfield
Hi J.P,

I've tried out your example and found that with paged databases and
your supplied model everything works fine for the first viewer then on
the subsequent viewer I get:

Warning: detected OpenGL error 'invalid operation' 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(..)

For none paged databases, even ones with texturing I'm not getting any
errors though, for any of the viewer runs.  I really don't know what
this means if anything, perhaps just a coincidence. Curiously your
database uses straight osg::Geometry meshes for geometry, while the
ones of mine were built with osgTerrain::TerrainTile.  Your database
will be only loading the topmost tile so the DatabasePager won't
actually be even playing a part, so I doubt this is part of the
equation.

While I can't see a particular pattern emerging, I can at least
reproduce the issue.  I'll try and remove the multi-view element to
the equation as I wouldn't have thought use of CompositeViewer will be
a particular problem for VBO/Texture object usage.

Robert.

On Wed, Nov 25, 2009 at 8:28 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Robert, J-S,

 the results of my most recent tests:

 With old texture pool (#define USE_NEW_TEXTURE_POOL 1 commented out):

 ./test cow.osg - All OK

 ./test earth_sphere_dt1.ive - All OK (see model attached)

 ./test earth.ive - sometimes corrupted model and textures, sometimes
 segfault, looks like reading bogus data from the GPU (I used the top level
 file from www.openscenegraph.org/data/earth_bayarea/earth.ive)

 With new texture pool:

 ./test cow.osg - All OK

 ./test earth_sphere_dt1.ive - textures missing on second viewer start, get
 warning:
 Warning: detected OpenGL error 'invalid operation' at After
 Renderer::compile

 ./test earth.ive - segfault or corrupted display.

 Latest test app also attached. I've tried to switch off unref of images
 after apply, hope it worked.

 regards
 jp

 J.P. Delport wrote:

 Hi J-S,

 Jean-Sébastien Guay wrote:

 Hi again,

 I haven't had a chance to check your code yet, give me a few minutes and
 I'll check if there's anything amiss that I can see.

 I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN
 head. But it seems that you've pinned it down to the texture pool as I
 thought, though it would seem to be OS specific? A bit weird.

 Sorry I couldn't help more.

 can you try with terrain as the parameter to the test app. For me this
 still fails on the second creation of the viewer. When zooming into the
 terrain the newly loaded textures are OK though.

 jp


 J-S


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

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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Jason Beverage
Hi Robert,

This sounds the issue that I've been seeing with regards to context ID reuse
as mentioned in this thread (
http://groups.google.com/group/osg-users/browse_thread/thread/249e5f90cf64f299/190e5f7a8c25bdaa?lnk=gstq=++Crash+in+nVidia+driver+%3A+particles+%2B+dynamically+adding%2Fremoving+views++#190e5f7a8c25bdaa
).

I would see similar crashes / missing textures, but only when previous
context ID's were reused, and only when using paged databases.

Thanks,

Jason

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

 Hi J.P,

 I've tried out your example and found that with paged databases and
 your supplied model everything works fine for the first viewer then on
 the subsequent viewer I get:

 Warning: detected OpenGL error 'invalid operation' 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(..)

 For none paged databases, even ones with texturing I'm not getting any
 errors though, for any of the viewer runs.  I really don't know what
 this means if anything, perhaps just a coincidence. Curiously your
 database uses straight osg::Geometry meshes for geometry, while the
 ones of mine were built with osgTerrain::TerrainTile.  Your database
 will be only loading the topmost tile so the DatabasePager won't
 actually be even playing a part, so I doubt this is part of the
 equation.

 While I can't see a particular pattern emerging, I can at least
 reproduce the issue.  I'll try and remove the multi-view element to
 the equation as I wouldn't have thought use of CompositeViewer will be
 a particular problem for VBO/Texture object usage.

 Robert.

 On Wed, Nov 25, 2009 at 8:28 AM, J.P. Delport jpdelp...@csir.co.za
 wrote:
  Hi Robert, J-S,
 
  the results of my most recent tests:
 
  With old texture pool (#define USE_NEW_TEXTURE_POOL 1 commented out):
 
  ./test cow.osg - All OK
 
  ./test earth_sphere_dt1.ive - All OK (see model attached)
 
  ./test earth.ive - sometimes corrupted model and textures, sometimes
  segfault, looks like reading bogus data from the GPU (I used the top
 level
  file from www.openscenegraph.org/data/earth_bayarea/earth.ive)
 
  With new texture pool:
 
  ./test cow.osg - All OK
 
  ./test earth_sphere_dt1.ive - textures missing on second viewer start,
 get
  warning:
  Warning: detected OpenGL error 'invalid operation' at After
  Renderer::compile
 
  ./test earth.ive - segfault or corrupted display.
 
  Latest test app also attached. I've tried to switch off unref of images
  after apply, hope it worked.
 
  regards
  jp
 
  J.P. Delport wrote:
 
  Hi J-S,
 
  Jean-Sébastien Guay wrote:
 
  Hi again,
 
  I haven't had a chance to check your code yet, give me a few minutes
 and
  I'll check if there's anything amiss that I can see.
 
  I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN
  head. But it seems that you've pinned it down to the texture pool as I
  thought, though it would seem to be OS specific? A bit weird.
 
  Sorry I couldn't help more.
 
  can you try with terrain as the parameter to the test app. For me this
  still fails on the second creation of the viewer. When zooming into the
  terrain the newly loaded textures are OK though.
 
  jp
 
 
  J-S
 
 
  --
  This message is subject to the CSIR's copyright terms and conditions,
 e-mail
  legal notice, and implemented Open Document Format (ODF) standard. The
 full
  disclaimer details can be found at http://www.csir.co.za/disclaimer.html
 .
 
  This message has been scanned for viruses and dangerous content by
  MailScanner, and is believed to be clean.  MailScanner thanks Transtec
  Computers for their support.
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 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] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Jean-Sébastien Guay

Hi Robert, Jason,

I would see similar crashes / missing textures, but only when previous 
context ID's were reused, and only when using paged databases.


I'd sure like to see this fixed... I posted an example reproducing the 
issue on osg-users a while back but Robert was busy on the GLES port. 
Now that you're done, could you investigate that issue (which seems 
related to this one too) please?


Note that the issue happened both with and without the texture pool 
support for me (in fact we spotted it in our app which is built on OSG 
2.6). We worked around the issue temporarily by incrementing the context 
usage count so that context IDs are not reused, but it would be better 
of course if OSG cleaned up after itself correctly when a context was 
destroyed so that context ID reuse would work correctly.


If you want me to repost my (and Jason's) latest code that reproduced 
the issue with context ID reuse, just ask. I think you can get it from 
the link Jason posted though.


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] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Robert Osfield
Hi J.P,

I've modified the osgcamera example to have code path for testing a
series viewers, with sharing models and reloading them for each
viewer.  I've written about it on the thread VBO's - lifetime..
I'm able to get GL errors when using VBO's, and with your test model
with a straight osgViewer::Viewer app.

Below is the output of of running with your test model.  I get even
more errors when I force the use of VBO's with --vbo.

The VBO and Texture object pools are all implemented independantly,
but they are pretty similar code paths so there is decent chance that
if an error exists in one it may well be present in the other.

What the error might be I have no clue yet...

Robert.

 osgcamera -r 3 earth_sphere_dt1.ive
+ New viewer 
 Viewer ended --

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

+ New viewer 
Warning: detected OpenGL error 'invalid operation' at After Renderer::compile
 Viewer ended --
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-25 Thread Robert Osfield
Hi J.P.

I've just changed USE_NEW_TEXTURE_POOL to 0 and then tested:

  osgcamera -r 3 earth_sphere_dt1.ive

And it doesn't produce any errors and model always comes up with
textures.  So it does look like the new osgcamera test is sufficient
for testing this particular bug.

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


[osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi all,

I've run into the classic missing textures problem when stopping and 
restarting a compositeviewer multiple times in the same app. From 
previous threads on this problem it seems to be context cleanup/GL 
object cleanup that does not get done properly, but I'm just using the 
normal CompositeViewer and not messing with contexts/windows/sceneviews 
myself, so I thought the cleanup would be handled correctly.


Attached a very slightly modified compositeviewer example. All it does 
is create/destruct the compositeviewer 5 times. When the viewer is 
created for the second time, all my textures are gone (just run without 
any arguments).


Can anyone confirm the missing textures? Any hints as to what else needs 
to be done to make sure everything is cleared/flushed correctly?


thanks
jp

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


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




manytimes.tgz
Description: application/compressed-tar
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Robert Osfield
Hi J.P,

The typical problem is that the scene graph has been set up to unref
texture images after apply so when it comes to reloading the texture
images there aren't the to download.

Robert.

On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi all,

 I've run into the classic missing textures problem when stopping and
 restarting a compositeviewer multiple times in the same app. From previous
 threads on this problem it seems to be context cleanup/GL object cleanup
 that does not get done properly, but I'm just using the normal
 CompositeViewer and not messing with contexts/windows/sceneviews myself, so
 I thought the cleanup would be handled correctly.

 Attached a very slightly modified compositeviewer example. All it does is
 create/destruct the compositeviewer 5 times. When the viewer is created for
 the second time, all my textures are gone (just run without any arguments).

 Can anyone confirm the missing textures? Any hints as to what else needs to
 be done to make sure everything is cleared/flushed correctly?

 thanks
 jp

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

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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Robert Osfield
Hi J.P.

I'm still knee deep in merging submissions so can't yet go off
reviewing user code.  In principle it is possible to mange open and
closing viewers.  I can point you in the right direction but have to
let you get on with it otherwise.

Robert.

On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Robert,

 Robert Osfield wrote:

 Hi J.P,

 The typical problem is that the scene graph has been set up to unref
 texture images after apply so when it comes to reloading the texture
 images there aren't the to download.

 should this still happen when I'm completely reloading a scene after the
 viewer and scene have been deleted completely?

 It seems that OSG thinks there is still a valid texture it can use after
 I've deleted the scene and CompositeViewer.

 Running the attached e.g.:
 ./test cow.osg

 Constructing PixelBufferObject for image=0x9547928
 _maxTexturePoolSize=0
 _maxBufferObjectPoolSize=0
 Created new TextureObject, _numOfTextureObjects 1
 Created new TextureObject, _numOfTextureObjects 1

 now I click the X on the window and the app deletes the scene and viewer and
 creates them anew:

 _maxTexturePoolSize=0
 _maxBufferObjectPoolSize=0
 Reusing orhpahned TextureObject, _numOfTextureObjects=1
 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
 Reusing orhpahned TextureObject, _numOfTextureObjects=1
 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)

 So it tries to reuse something that's not there? How can I convince OSG to
 drop all caches/buffers/GL objects?

 jp



 Robert.

 On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za
 wrote:

 Hi all,

 I've run into the classic missing textures problem when stopping and
 restarting a compositeviewer multiple times in the same app. From
 previous
 threads on this problem it seems to be context cleanup/GL object cleanup
 that does not get done properly, but I'm just using the normal
 CompositeViewer and not messing with contexts/windows/sceneviews myself,
 so
 I thought the cleanup would be handled correctly.

 Attached a very slightly modified compositeviewer example. All it does is
 create/destruct the compositeviewer 5 times. When the viewer is created
 for
 the second time, all my textures are gone (just run without any
 arguments).

 Can anyone confirm the missing textures? Any hints as to what else needs
 to
 be done to make sure everything is cleared/flushed correctly?

 thanks
 jp

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

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


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


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


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

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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi,

Robert Osfield wrote:

Hi J.P.

I'm still knee deep in merging submissions so can't yet go off
reviewing user code.  In principle it is possible to mange open and
closing viewers.  I can point you in the right direction but have to
let you get on with it otherwise.


I understand, I'll try search for cleanup code, just not sure where to 
start.


Anyone else?

jp



Robert.

On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote:

Hi Robert,

Robert Osfield wrote:

Hi J.P,

The typical problem is that the scene graph has been set up to unref
texture images after apply so when it comes to reloading the texture
images there aren't the to download.

should this still happen when I'm completely reloading a scene after the
viewer and scene have been deleted completely?

It seems that OSG thinks there is still a valid texture it can use after
I've deleted the scene and CompositeViewer.

Running the attached e.g.:
./test cow.osg

Constructing PixelBufferObject for image=0x9547928
_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Created new TextureObject, _numOfTextureObjects 1
Created new TextureObject, _numOfTextureObjects 1

now I click the X on the window and the app deletes the scene and viewer and
creates them anew:

_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)

So it tries to reuse something that's not there? How can I convince OSG to
drop all caches/buffers/GL objects?

jp



Robert.

On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za
wrote:

Hi all,

I've run into the classic missing textures problem when stopping and
restarting a compositeviewer multiple times in the same app. From
previous
threads on this problem it seems to be context cleanup/GL object cleanup
that does not get done properly, but I'm just using the normal
CompositeViewer and not messing with contexts/windows/sceneviews myself,
so
I thought the cleanup would be handled correctly.

Attached a very slightly modified compositeviewer example. All it does is
create/destruct the compositeviewer 5 times. When the viewer is created
for
the second time, all my textures are gone (just run without any
arguments).

Can anyone confirm the missing textures? Any hints as to what else needs
to
be done to make sure everything is cleared/flushed correctly?

thanks
jp

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

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


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



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


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

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


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



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


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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi Robert,

it seems to be something broken on context destruction with the new 
texture pool. The orphaned list does not seem to be cleared properly. A 
texture is used from the orphaned list even though the context it 
belonged to had been destroyed earlier.


When libosg is compiled with

#define USE_NEW_TEXTURE_POOL 1

commented out, the example works as expected.

regards
jp

J.P. Delport wrote:

Hi,

Robert Osfield wrote:

Hi J.P.

I'm still knee deep in merging submissions so can't yet go off
reviewing user code.  In principle it is possible to mange open and
closing viewers.  I can point you in the right direction but have to
let you get on with it otherwise.


I understand, I'll try search for cleanup code, just not sure where to 
start.


Anyone else?

jp



Robert.

On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za 
wrote:

Hi Robert,

Robert Osfield wrote:

Hi J.P,

The typical problem is that the scene graph has been set up to unref
texture images after apply so when it comes to reloading the texture
images there aren't the to download.

should this still happen when I'm completely reloading a scene after the
viewer and scene have been deleted completely?

It seems that OSG thinks there is still a valid texture it can use after
I've deleted the scene and CompositeViewer.

Running the attached e.g.:
./test cow.osg

Constructing PixelBufferObject for image=0x9547928
_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Created new TextureObject, _numOfTextureObjects 1
Created new TextureObject, _numOfTextureObjects 1

now I click the X on the window and the app deletes the scene and 
viewer and

creates them anew:

_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)

So it tries to reuse something that's not there? How can I convince 
OSG to

drop all caches/buffers/GL objects?

jp



Robert.

On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za
wrote:

Hi all,

I've run into the classic missing textures problem when stopping and
restarting a compositeviewer multiple times in the same app. From
previous
threads on this problem it seems to be context cleanup/GL object 
cleanup

that does not get done properly, but I'm just using the normal
CompositeViewer and not messing with contexts/windows/sceneviews 
myself,

so
I thought the cleanup would be handled correctly.

Attached a very slightly modified compositeviewer example. All it 
does is
create/destruct the compositeviewer 5 times. When the viewer is 
created

for
the second time, all my textures are gone (just run without any
arguments).

Can anyone confirm the missing textures? Any hints as to what else 
needs

to
be done to make sure everything is cleared/flushed correctly?

thanks
jp

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


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


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





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




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


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


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





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




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


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


___
osg-users mailing 

Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Jean-Sébastien Guay

Hi J.P.,

Can anyone confirm the missing textures? Any hints as to what else needs 
to be done to make sure everything is cleared/flushed correctly?


We've been doing something similar to this for a while now and it's 
worked for us, what I'm wondering is whether the recent changes to 
texture buffering and such would have broken this (i.e. if something 
that needs to be cleaned up and was before now isn't). Our own app still 
uses OSG 2.6 so I wouldn't have seen this.


I haven't had a chance to check your code yet, give me a few minutes and 
I'll check if there's anything amiss that I can see.


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] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi J-S,

Jean-Sébastien Guay wrote:

Hi J.P.,

Can anyone confirm the missing textures? Any hints as to what else 
needs to be done to make sure everything is cleared/flushed correctly?


We've been doing something similar to this for a while now and it's 
worked for us, what I'm wondering is whether the recent changes to 
texture buffering and such would have broken this (i.e. if something 
that needs to be cleaned up and was before now isn't). 


I think your hunch is correct. I've just tried with the old texture 
manager and the textures were loaded OK on the second viewer instance.


jp

Our own app still 
uses OSG 2.6 so I wouldn't have seen this.


I haven't had a chance to check your code yet, give me a few minutes and 
I'll check if there's anything amiss that I can see.


J-S


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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Jean-Sébastien Guay

Hi again,

I haven't had a chance to check your code yet, give me a few minutes and 
I'll check if there's anything amiss that I can see.


I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN 
head. But it seems that you've pinned it down to the texture pool as I 
thought, though it would seem to be OS specific? A bit weird.


Sorry I couldn't help more.

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] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Drolet, Frederic
-24-09 8:53 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] CompositeViewer context cleanup and missing textures

Hi,

Robert Osfield wrote:
 Hi J.P.
 
 I'm still knee deep in merging submissions so can't yet go off
 reviewing user code.  In principle it is possible to mange open and
 closing viewers.  I can point you in the right direction but have to
 let you get on with it otherwise.

I understand, I'll try search for cleanup code, just not sure where to 
start.

Anyone else?

jp

 
 Robert.
 
 On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote:
 Hi Robert,

 Robert Osfield wrote:
 Hi J.P,

 The typical problem is that the scene graph has been set up to unref
 texture images after apply so when it comes to reloading the texture
 images there aren't the to download.
 should this still happen when I'm completely reloading a scene after the
 viewer and scene have been deleted completely?

 It seems that OSG thinks there is still a valid texture it can use after
 I've deleted the scene and CompositeViewer.

 Running the attached e.g.:
 ./test cow.osg

 Constructing PixelBufferObject for image=0x9547928
 _maxTexturePoolSize=0
 _maxBufferObjectPoolSize=0
 Created new TextureObject, _numOfTextureObjects 1
 Created new TextureObject, _numOfTextureObjects 1

 now I click the X on the window and the app deletes the scene and viewer and
 creates them anew:

 _maxTexturePoolSize=0
 _maxBufferObjectPoolSize=0
 Reusing orhpahned TextureObject, _numOfTextureObjects=1
 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
 Reusing orhpahned TextureObject, _numOfTextureObjects=1
 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)

 So it tries to reuse something that's not there? How can I convince OSG to
 drop all caches/buffers/GL objects?

 jp


 Robert.

 On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za
 wrote:
 Hi all,

 I've run into the classic missing textures problem when stopping and
 restarting a compositeviewer multiple times in the same app. From
 previous
 threads on this problem it seems to be context cleanup/GL object cleanup
 that does not get done properly, but I'm just using the normal
 CompositeViewer and not messing with contexts/windows/sceneviews myself,
 so
 I thought the cleanup would be handled correctly.

 Attached a very slightly modified compositeviewer example. All it does is
 create/destruct the compositeviewer 5 times. When the viewer is created
 for
 the second time, all my textures are gone (just run without any
 arguments).

 Can anyone confirm the missing textures? Any hints as to what else needs
 to
 be done to make sure everything is cleared/flushed correctly?

 thanks
 jp

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

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


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


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

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

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


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


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

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

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

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

Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi J-S,

Jean-Sébastien Guay wrote:

Hi again,

I haven't had a chance to check your code yet, give me a few minutes 
and I'll check if there's anything amiss that I can see.


I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN 
head. But it seems that you've pinned it down to the texture pool as I 
thought, though it would seem to be OS specific? A bit weird.


maybe I've missed an update in the last week, will try the latest SVN.



Sorry I couldn't help more.


Thanks for testing.

jp



J-S


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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Jean-Sébastien Guay

Hi Frederic,


Since we don't have direct access to the textures, we can't make the call to 
setUnRefImageDataAfterApply(). Would there be another way?


You can run a visitor to get to the textures and turn this setting off. 
You can either make your own, or use osgUtil::Optimizer::TextureVisitor 
like this:


osg::Node* node = osgDB::readNodeFile(...);
osgUtil::Optimizer::TextureVisitor tv(true, false, false, false, false, 
false);

node-accept(tv);

(the arguments to TextureVisitor's constructor are changeAutoUnRef, 
valueAutoUnRef, and the rest all false so nothing else is changed.)


Now, as for the modified CompositeViewer example, I tried it on Windows Vista and it simply crashes the first time I hit ESC or the X button. 


Strange, I tried it on Vista as well and I didn't have any problem. I 
notice you're using the stable version of OSG (osg55 = OSG 2.8, the 
current SVN trunk is at 62), so perhaps something was fixed that affects 
this, and it would not crash for you in a more recent version.


Hope this helps,

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] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport
: November-24-09 8:53 AM To: OpenSceneGraph Users 
Subject: Re: [osg-users] CompositeViewer context cleanup and missing

textures

Hi,

Robert Osfield wrote:

Hi J.P.

I'm still knee deep in merging submissions so can't yet go off 
reviewing user code.  In principle it is possible to mange open and

 closing viewers.  I can point you in the right direction but have
to let you get on with it otherwise.


I understand, I'll try search for cleanup code, just not sure where
to start.

Anyone else?

jp


Robert.

On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport
jpdelp...@csir.co.za wrote:

Hi Robert,

Robert Osfield wrote:

Hi J.P,

The typical problem is that the scene graph has been set up to
unref texture images after apply so when it comes to reloading
the texture images there aren't the to download.

should this still happen when I'm completely reloading a scene
after the viewer and scene have been deleted completely?

It seems that OSG thinks there is still a valid texture it can
use after I've deleted the scene and CompositeViewer.

Running the attached e.g.: ./test cow.osg

Constructing PixelBufferObject for image=0x9547928 
_maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new

TextureObject, _numOfTextureObjects 1 Created new TextureObject,
_numOfTextureObjects 1

now I click the X on the window and the app deletes the scene and
viewer and creates them anew:

_maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Reusing
orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected
OpenGL error 'invalid value' after RenderBin::draw(,) Reusing
orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected
OpenGL error 'invalid value' after RenderBin::draw(,)

So it tries to reuse something that's not there? How can I
convince OSG to drop all caches/buffers/GL objects?

jp



Robert.

On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport
jpdelp...@csir.co.za wrote:

Hi all,

I've run into the classic missing textures problem when
stopping and restarting a compositeviewer multiple times in
the same app. From previous threads on this problem it seems
to be context cleanup/GL object cleanup that does not get
done properly, but I'm just using the normal CompositeViewer
and not messing with contexts/windows/sceneviews myself, so I
thought the cleanup would be handled correctly.

Attached a very slightly modified compositeviewer example.
All it does is create/destruct the compositeviewer 5 times.
When the viewer is created for the second time, all my
textures are gone (just run without any arguments).

Can anyone confirm the missing textures? Any hints as to what
else needs to be done to make sure everything is
cleared/flushed correctly?

thanks jp

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

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


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





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




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

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


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





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






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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi J-S,

J.P. Delport wrote:

Hi J-S,

Jean-Sébastien Guay wrote:

Hi again,

I haven't had a chance to check your code yet, give me a few minutes 
and I'll check if there's anything amiss that I can see.


I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN 
head. But it seems that you've pinned it down to the texture pool as I 
thought, though it would seem to be OS specific? A bit weird.


maybe I've missed an update in the last week, will try the latest SVN.



Latest SVN indeed works as expected. I must have been using a dud 
version from somewhere in svn land.


Sorry for the noise folks... move right along... nothing to see here...



Sorry I couldn't help more.


Someone saying: Hey, it works for me is enough sometimes.

thanks
jp

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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Robert Osfield
Hi J.P,

On Tue, Nov 24, 2009 at 3:32 PM, J.P. Delport jpdelp...@csir.co.za wrote:
 Latest SVN indeed works as expected. I must have been using a dud version
 from somewhere in svn land.

 Sorry for the noise folks... move right along... nothing to see here...

Does this mean that there isn't a bug to look into?  Can I now safely
ignore this thread?

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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi Robert,

J.P. Delport wrote:

Hi Robert,

it seems to be something broken on context destruction with the new 
texture pool. The orphaned list does not seem to be cleared properly. A 
texture is used from the orphaned list even though the context it 
belonged to had been destroyed earlier.


When libosg is compiled with

#define USE_NEW_TEXTURE_POOL 1

commented out, the example works as expected.


Latest svn also works, so you've already fixed what I tried to describe 
above. That'll teach me to update before I go bug hunting.


rgds
jp



regards
jp

J.P. Delport wrote:

Hi,

Robert Osfield wrote:

Hi J.P.

I'm still knee deep in merging submissions so can't yet go off
reviewing user code.  In principle it is possible to mange open and
closing viewers.  I can point you in the right direction but have to
let you get on with it otherwise.


I understand, I'll try search for cleanup code, just not sure where to 
start.


Anyone else?

jp



Robert.

On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za 
wrote:

Hi Robert,

Robert Osfield wrote:

Hi J.P,

The typical problem is that the scene graph has been set up to unref
texture images after apply so when it comes to reloading the texture
images there aren't the to download.
should this still happen when I'm completely reloading a scene after 
the

viewer and scene have been deleted completely?

It seems that OSG thinks there is still a valid texture it can use 
after

I've deleted the scene and CompositeViewer.

Running the attached e.g.:
./test cow.osg

Constructing PixelBufferObject for image=0x9547928
_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Created new TextureObject, _numOfTextureObjects 1
Created new TextureObject, _numOfTextureObjects 1

now I click the X on the window and the app deletes the scene and 
viewer and

creates them anew:

_maxTexturePoolSize=0
_maxBufferObjectPoolSize=0
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)
Reusing orhpahned TextureObject, _numOfTextureObjects=1
Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,)

So it tries to reuse something that's not there? How can I convince 
OSG to

drop all caches/buffers/GL objects?

jp



Robert.

On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za
wrote:

Hi all,

I've run into the classic missing textures problem when stopping 
and

restarting a compositeviewer multiple times in the same app. From
previous
threads on this problem it seems to be context cleanup/GL object 
cleanup

that does not get done properly, but I'm just using the normal
CompositeViewer and not messing with contexts/windows/sceneviews 
myself,

so
I thought the cleanup would be handled correctly.

Attached a very slightly modified compositeviewer example. All it 
does is
create/destruct the compositeviewer 5 times. When the viewer is 
created

for
the second time, all my textures are gone (just run without any
arguments).

Can anyone confirm the missing textures? Any hints as to what else 
needs

to
be done to make sure everything is cleared/flushed correctly?

thanks
jp

--
This message is subject to the CSIR's copyright terms and conditions,
e-mail
legal notice, and implemented Open Document Format (ODF) standard. 
The

full
disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.


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

Computers for their support.


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





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




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


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


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





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







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


This message has been scanned for viruses and 

Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread Jean-Sébastien Guay

Hi Frederic,


Some more fun in perspective! At least, I'll try the texture pool solution in 
the latest SVN build to see if it helps.


I think that's what's most susceptible to work. Even stable releases can 
have bugs. So I really suspect that you're hitting a bug that's fixed in 
SVN. As I said, I run the example on Windows Vista without crashes (I 
tried multiple times without problems) and I run an nVidia card as well 
(9800GTX+) with semi-recent drivers.


Hope this helps,

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] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi Robert,

Robert Osfield wrote:

Hi J.P,

On Tue, Nov 24, 2009 at 3:32 PM, J.P. Delport jpdelp...@csir.co.za wrote:

Latest SVN indeed works as expected. I must have been using a dud version
from somewhere in svn land.

Sorry for the noise folks... move right along... nothing to see here...


Does this mean that there isn't a bug to look into?  Can I now safely
ignore this thread?


this is what I hoped, but no. I just now reran the example I attached 
with terrain as the parameter instead of cow.osg and now it again fails 
on the second viewer being created. The textures of the particles are 
OK, but textures on the terrain are missing. When zooming into terrain, 
the newly loaded textures are OK.


I've again tried by commenting out

#define USE_NEW_TEXTURE_POOL 1

and then the terrain is also fine on the second run.

So it seems it's not finished yet, sorry...

jp



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



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


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


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


Re: [osg-users] CompositeViewer context cleanup and missing textures

2009-11-24 Thread J.P. Delport

Hi J-S,

Jean-Sébastien Guay wrote:

Hi again,

I haven't had a chance to check your code yet, give me a few minutes 
and I'll check if there's anything amiss that I can see.


I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN 
head. But it seems that you've pinned it down to the texture pool as I 
thought, though it would seem to be OS specific? A bit weird.


Sorry I couldn't help more.


can you try with terrain as the parameter to the test app. For me this 
still fails on the second creation of the viewer. When zooming into the 
terrain the newly loaded textures are OK though.


jp



J-S


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


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


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