Remove serialization again from IUserData

This can't work as on deserialize it would need to have the type for IUserData already.
And that's impossible with the way it's used right now.
Would need some kind of factory or so probably, but I'll ignore this for now.
Note that it's still possible to call some serialization manually on the derived classes by adding it there if needed.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6568 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2023-11-07 17:43:01 +00:00
parent 3c9a856e6d
commit feaed624f7
2 changed files with 0 additions and 12 deletions

@ -29,12 +29,6 @@ namespace io
return getType() == other.getType();
}
//! Writes data attributes
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {}
//! Reads data attributes
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) {}
//! Used internally by Irrlicht to check if data has changed
bool operator!=(const IUserData& other) const
{

@ -2164,9 +2164,6 @@ io::IAttributes* CNullDriver::createAttributesFromMaterial(const video::SMateria
attr->addFloat("PolygonOffsetDepthBias", material.PolygonOffsetDepthBias);
attr->addFloat("PolygonOffsetSlopeScale", material.PolygonOffsetSlopeScale);
if ( material.UserData )
material.UserData->serializeAttributes(attr, options);
// TODO: Would be nice to have a flag that only serializes rest of texture data when a texture pointer exists.
prefix = "BilinearFilter";
for (i=0; i<MATERIAL_MAX_TEXTURES; ++i)
@ -2252,9 +2249,6 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater
outMaterial.PolygonOffsetDepthBias = attr->getAttributeAsFloat("PolygonOffsetDepthBias", outMaterial.PolygonOffsetDepthBias);
outMaterial.PolygonOffsetSlopeScale = attr->getAttributeAsFloat("PolygonOffsetSlopeScale", outMaterial.PolygonOffsetSlopeScale);
if ( outMaterial.UserData )
outMaterial.UserData->deserializeAttributes(attr);
prefix = "BilinearFilter";
if (attr->existsAttribute(prefix.c_str())) // legacy
outMaterial.setFlag(EMF_BILINEAR_FILTER, attr->getAttributeAsBool(prefix.c_str()));