Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-16 Thread Robert Osfield
Hi Cedric, osgViewer/core OSG should already have all the mechanisms available to do clean up of the scene graph and associated OpenGL objects correctly - and in fact it's possibly these existing mechanisms that are causing the failure in question.  I suspect the solution will come from studying

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-11 Thread Robert Osfield
Hi Cedric, As another lead into this problem I've found that the osgcatch example now hangs on exit when it's run multi-threaded. All the other examples exit fine, but osgcatch hangs inside th new TextureObject clean up code at a mutex that seems to be left locked by another thread. I don't

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-11 Thread Cedric Pinson
Hi Robert, I think to address the problem but i need to finish other stuff before. A way i thought to resolve that should be to add to osgViewer a cleanup method that would release all singleton and data that make it safe to quit an application. A method like that could be called automatically by

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-09 Thread Eric Deko
pankajnagarkoti80 wrote: The benefit the GL object pools provide is that we can scale up the scene graph in main memory without blowing OpenGL driver and GPU memory as we would do without the new pools. I agree, that is really a great benifit especially with the GL users. --

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-09 Thread Robert Osfield
Hi Cedric, Thanks for keep on digging into this problem. I don't think this is a bug in your code, rather you've just set up a set of circumstances that the normal clean up is circumvented and an errors occurs. If possible we should find a way of avoid the problem in full range of usage. Does

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-09 Thread Cedric Pinson
Hi Robert, Yes you will be able to reproduce the valgrind output with the the code sample in the email. Cheers, Cedric -- +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Fri, 2009-10-09 at 14:24 +0100, Robert Osfield wrote: Hi Cedric, Thanks

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-08 Thread Cedric Pinson
Hi Robert, I updated to the svn trunk today, and i can notice a crash when quitting my application. To be sure it was with the new texture manager i defined USE_NEW_TEXTURE_POOL to 0 and then to 1. I dont have yet found the problem, but i guess it's linked with my texture manager, i own some

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-08 Thread Cedric Pinson
Hi Robert, I cleaned all my singleton before quitting the application. Now i have the following crash but sometimes it's random. It seems the TextureObjectManager is deleted before the cache is cleared by Registry destructor and produce a crash somewhere. I am a bit confuse now, i continue to

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread J.P. Delport
Hi Robert, What results do you get with the bug fixes I've just checked in? I've just updated and now I get a single corrupted image flashed onto the screen and then a segfault. $ osgmovie --mouse --interactive --shaders -e ffmpeg file.avi image-s()640 image-t()=480 aspectRatio=1

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread Robert Osfield
Hi J.P, On Wed, Oct 7, 2009 at 7:59 AM, J.P. Delport jpdelp...@csir.co.za wrote: Debug build still did not provide a nice backtrace, but I've followed the crash to void TextureRectangle::applyTexImage_subload in TextureRectangle.cpp At the line: dataPtr = reinterpret_castunsigned

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread J.P. Delport
Hi Robert, Robert Osfield wrote: Hi J.P, On Wed, Oct 7, 2009 at 7:59 AM, J.P. Delport jpdelp...@csir.co.za wrote: Debug build still did not provide a nice backtrace, but I've followed the crash to void TextureRectangle::applyTexImage_subload in TextureRectangle.cpp At the line: dataPtr =

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread Robert Osfield
Hi J.P., What hardware and OS are you testing on right now? On Wed, Oct 7, 2009 at 10:36 AM, J.P. Delport jpdelp...@csir.co.za wrote: It's normal for pbo-getOffset() to return a 0, and correct to pass this to glTexSubImage2D, but only if a PBO is bound, if it isn't then it will result in a

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread J.P. Delport
Hi, It's normal for pbo-getOffset() to return a 0, and correct to pass this to glTexSubImage2D, but only if a PBO is bound, if it isn't then it will result in a seg fault. Perhaps there is some mistake in the code that isn't binding the PBO when it should. OK, I'll try to check this too.

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread Robert Osfield
Hi J.P, On Wed, Oct 7, 2009 at 11:26 AM, J.P. Delport jpdelp...@csir.co.za wrote: just some more comments... I've compared code for Texture::applyTexImage2D_subload vs TextureRectangle::applyTexImage_subload in the former the result of pbo-getOffset() is never used. If in

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread J.P. Delport
Hi Robert, Robert Osfield wrote: Hi J.P., What hardware and OS are you testing on right now? Debian 32-bit, Nvidia driver. On Wed, Oct 7, 2009 at 10:36 AM, J.P. Delport jpdelp...@csir.co.za wrote: It's normal for pbo-getOffset() to return a 0, and correct to pass this to glTexSubImage2D,

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-07 Thread J.P. Delport
Hi Robert, Robert Osfield wrote: Hi J.P, On Wed, Oct 7, 2009 at 11:26 AM, J.P. Delport jpdelp...@csir.co.za wrote: just some more comments... I've compared code for Texture::applyTexImage2D_subload vs TextureRectangle::applyTexImage_subload in the former the result of pbo-getOffset() is

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-06 Thread J.P. Delport
Hi Robert, Robert Osfield wrote: A word of warning though, I have almost completely rewritten the way that the backend that drives texture objects and buffer objects, even when you don't enable the texture/buffer object pools, the code managing the GL objects is still completely different. With

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-06 Thread pankaj nagarkoti
The benefit the GL object pools provide is that we can scale up the scene graph in main memory without blowing OpenGL driver and GPU memory as we would do without the new pools. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17920#17920

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-06 Thread Robert Osfield
HI J.P., On Tue, Oct 6, 2009 at 8:26 AM, J.P. Delport jpdelp...@csir.co.za wrote: I have problems with PBOs since updating to the latest svn. I'm not setting any pool env variables. One can recreate the problem with osgmovie. E.g. $ osgmovie --mouse --interactive --shaders -e ffmpeg file.avi

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-06 Thread Robert Osfield
Hi J.P. On Tue, Oct 6, 2009 at 9:01 AM, Robert Osfield robert.osfi...@gmail.com wrote: Just tested this and I can confirm it happens for me too.  I did have this working as it was one of the elements I first tested, but alas there has clearly been a regression as I completed the rest of the

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-06 Thread J.P. Delport
Hi Robert, Robert Osfield wrote: I will investigate what had gone a miss. I have now tracked down the problem to a bug in the reassignment of TextureObject to a new TextureObjectSet, this is now fixed along with a couple of other bugs due to the unrefAfterApply not being disabled when the

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-04 Thread Robert Osfield
Thanks for the testing and pinpointing of the error. I've added an OSG_EXPORT to BufferData and checked this in. BufferObjectProfile won't need an export at it's a class entirely defined in the header. Cheers, Robert. On Sat, Oct 3, 2009 at 4:35 PM, Tony Horrobin tony.horro...@gmail.com wrote:

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Robert Osfield
Hi All, On Fri, Oct 2, 2009 at 10:24 PM, Robert Osfield robert.osfi...@gmail.com wrote: You'll need to wait, my attempt to check changes in has failed due to problems connecting to the server..  I'll ping the list once things are successfully checked in. Changes now checked in. For majority

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Wang Rui
Hi Robert, Some errors on my WindowsXP SP2 + VS2008 while building SceneView.cpp. Modify the code at line 1028: osg::GLBufferObjectManager::GLBufferObjectManager* bom = osg::GLBufferObjectManager::getGLBufferObjectManager(state-getContextID()); to: osg::GLBufferObjectManager* bom =

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Paul Martz
Hi Robert -- Current svn builds OK on OSX, but osgDB::ReadNodeFile is coming up as an undefined symbol when I try to build any of my own code. Note that the OSG examples all appear to build fine. So this is an odd one. Windows build is underway. I'll look into this further and let you know if

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Robert Osfield
Thanks Wang Rui, I've made your suggestion change and checked in into svn/trunk. Cheers, Robert. On Sat, Oct 3, 2009 at 2:40 PM, Wang Rui wangra...@gmail.com wrote: Hi Robert, Some errors on my WindowsXP SP2 + VS2008 while building SceneView.cpp. Modify the code at line 1028:

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Robert Osfield
Hi Paul, On Sat, Oct 3, 2009 at 3:17 PM, Paul Martz pma...@skew-matrix.com wrote: Hi Robert -- Current svn builds OK on OSX, but osgDB::ReadNodeFile is coming up as an undefined symbol when I try to build any of my own code. Note that the OSG examples all appear to build fine. So this is an

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Tony Horrobin
Hi Robert, On Vista SP2 with Visual C++ 2005: osgparametric fails with unresolved symbol osg::BufferData::setBufferObject(class osg::BufferObject *) I believe this is due to missing OSG_EXPORT for BufferData in osg/BufferObject. BufferObjectProfile is also missing OSG_EXPORT but this doesn't

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Paul Martz
Robert Osfield wrote: On Sat, Oct 3, 2009 at 3:17 PM, Paul Martz pma...@skew-matrix.com wrote: Hi Robert -- Current svn builds OK on OSX, but osgDB::ReadNodeFile is coming up as an undefined symbol when I try to build any of my own code. Note that the OSG examples all appear to build fine. So

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-03 Thread Paul Martz
Tony Horrobin wrote: Hi Robert, On Vista SP2 with Visual C++ 2005: osgparametric fails with unresolved symbol osg::BufferData::setBufferObject(class osg::BufferObject *) I saw this on OSX as well, buried in amongst all the readNodeFile calls that came up undefined. This was a bad build

[osg-users] New OpenGL texture object and buffer object pool support

2009-10-02 Thread Robert Osfield
Hi All, I've been pretty quiet and the public list/forum through September, keeping my head down developing new functionality for the OSG... and the new functionality I'm pleased to announce today is that we now have a loverly new back-end implementation for texture objects and buffer objects

Re: [osg-users] New OpenGL texture object and buffer object pool support

2009-10-02 Thread Robert Osfield
So... how to try out the new texture and buffer object pools?   First up you'll need to update to the latest OpenScenGraph svn/trunk. You'll need to wait, my attempt to check changes in has failed due to problems connecting to the server.. I'll ping the list once things are successfully