of OSG. I modified the osgDB::InputStream and OutputStream and the PagedLOD wrapper as well. Now all seems to work fine with paged scenes. I've tested with the puget terrain data and the osgdem application from VPB: # osgdem --xx 10 --yy 10 -t ps_texture_4k.tif --xx 10 --yy 10 -d ps_height_4k.tif -l 8 -v 0.1 -o puget.osgb As the ive plugin does, The PagedLOD wrapper now automatically add the latest file path to PagedLODs' databasePath member, to help them find correct child positions. I also changed the image storage strategy of the OutputStream class, to store them inline by default. The osgt extension should also work, in case the image files are also written to the disk. "
13 lines
446 B
C++
13 lines
446 B
C++
#include <osgTerrain/Layer>
|
|
#include <osgDB/ObjectWrapper>
|
|
#include <osgDB/InputStream>
|
|
#include <osgDB/OutputStream>
|
|
|
|
REGISTER_OBJECT_WRAPPER( osgTerrain_SwitchLayer,
|
|
new osgTerrain::SwitchLayer,
|
|
osgTerrain::SwitchLayer,
|
|
"osg::Object osgTerrain::Layer osgTerrain::CompositeLayer osgTerrain::SwitchLayer" )
|
|
{
|
|
ADD_INT_SERIALIZER( ActiveLayer, -1 ); // _activeLayer
|
|
}
|