mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Theora texture for cloned material fix
When a TSShapeInstance makes a copy of its own materials through cloneMaterialList() (such as done with client side ShapeBase objects), the reference to a named diffuse render target was being lost. This affected using a TheoraTextureObject on a ShapeBase derived object (StaticShape, etc.).
This commit is contained in:
parent
fd467070b3
commit
e4df92a7bc
|
|
@ -259,8 +259,10 @@ void TSShapeInstance::cloneMaterialList( const FeatureSet *features )
|
|||
if ( mOwnMaterialList )
|
||||
return;
|
||||
|
||||
Material::sAllowTextureTargetAssignment = true;
|
||||
mMaterialList = new TSMaterialList(mMaterialList);
|
||||
initMaterialList( features );
|
||||
Material::sAllowTextureTargetAssignment = false;
|
||||
|
||||
mOwnMaterialList = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue