Hi J.P, This is an issue that's been covered before. The basic problem is that as an optimization for memory footprint the imagery is discarded after it is download to the the OpenGL texture, so once you discard the OpenGL texture object all record of it is lose - hence the white textures. You can disable this feature by setting:
DatabasePager::setUnrefImageDataAfterApplyPolicy(true, false); Or enable the texture pool as this disables the UnrefImageDataAfterApply globally as the features isn't compatible with using of the texture pool. You can enable the texture pool via osg::DisplaySettings::setTexturePoolSize(theSizeInBytesToUseForTheTexturePool); or via the env var OSG_TEXTURE_POOL_SIZE. Robert. On Mon, Jun 7, 2010 at 4:19 PM, J.P. Delport <[email protected]> wrote: > Hi, > > we are getting missing or corrupted textures in one of our apps when adding > and removing views. I've managed to create a test app from an earlier > example J-S made to show problems when adding and removing views. I'm > running svn head. > > To reproduce: > compile > $ cmake . > $ make > and then run e.g. > $ ./test http://www.openscenegraph.org/data/earth_bayarea/earth.ive > > or use any other vpb database. > > Test1: > When the window opens, press "a". A new view showing the earth should open. > Now press "a" again. Now only the first view remains, but with missing > textures. If one zooms in, newly paged textures are shown. > Some errors printed include: > Warning: detected OpenGL error 'invalid enumerant' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid enumerant' at After > Renderer::compile > > Test2: > comment out > #define WORKAROUND_SHARE_CONTEXT > in the osgviewer.cpp > Now on the first press of "a", the new window has a globe with no textures. > If one zooms in, newly paged textures are shown. > > I'm not sure if this is a bug or if I have to do something special to the > DatabasePager to get this type of use case to work. > > Setting threading models does not seem to change anything. Our app uses > SingleThreaded. > > It's as if textures are deleted from the wrong context or as if too many > textures are deleted. > > Any ideas/suggestions welcome. > > cheers > 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 > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

