Added the ability to turn off the external paging in of PagedLOD children.
This commit is contained in:
@@ -49,8 +49,9 @@
|
||||
#define VERSION_0038 38
|
||||
#define VERSION_0039 39
|
||||
#define VERSION_0040 40
|
||||
#define VERSION_0041 41
|
||||
|
||||
#define VERSION VERSION_0040
|
||||
#define VERSION VERSION_0041
|
||||
|
||||
/* The BYTE_SEX tag is used to check the endian
|
||||
of the IVE file being read in. The IVE format
|
||||
|
||||
@@ -37,6 +37,10 @@ void PagedLOD::write(DataOutputStream* out)
|
||||
out->writeFloat(getRadius());
|
||||
out->writeUInt(getNumChildrenThatCannotBeExpired());
|
||||
|
||||
if ( out->getVersion() >= VERSION_0041 )
|
||||
{
|
||||
out->writeBool(getDisableExternalChildrenPaging());
|
||||
}
|
||||
|
||||
unsigned int numChildrenToWriteOut = 0;
|
||||
|
||||
@@ -140,6 +144,11 @@ void PagedLOD::read(DataInputStream* in)
|
||||
setRadius(in->readFloat());
|
||||
setNumChildrenThatCannotBeExpired(in->readUInt());
|
||||
|
||||
if ( in->getVersion() >= VERSION_0041 )
|
||||
{
|
||||
setDisableExternalChildrenPaging(in->readBool());
|
||||
}
|
||||
|
||||
|
||||
// Read groups properties.
|
||||
// Read number of children.
|
||||
|
||||
@@ -53,6 +53,13 @@ bool PagedLOD_readLocalData(Object& obj, Input& fr)
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
bool flag;
|
||||
if (fr.read("DisableExternalChildrenPaging", flag))
|
||||
{
|
||||
lod.setDisableExternalChildrenPaging(flag);
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
bool matchFirst;
|
||||
if ((matchFirst=fr.matchSequence("FileNameList {")) || fr.matchSequence("FileNameList %i {"))
|
||||
{
|
||||
@@ -122,6 +129,9 @@ bool PagedLOD_writeLocalData(const Object& obj, Output& fw)
|
||||
|
||||
fw.indent() << "NumChildrenThatCannotBeExpired "<<lod.getNumChildrenThatCannotBeExpired()<<std::endl;
|
||||
|
||||
fw.indent() << "DisableExternalChildrenPaging "<<lod.getDisableExternalChildrenPaging()<<std::endl;
|
||||
|
||||
|
||||
fw.indent() << "FileNameList "<<lod.getNumFileNames()<<" {"<< std::endl;
|
||||
fw.moveIn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user