void kore::MeshComponent::setMesh(Mesh* mesh) { destroyAttributes(); _mesh = mesh; const std::vector<MeshAttributeArray>& vMeshAttributes = _mesh->getAttributes(); for (uint i = 0; i < vMeshAttributes.size(); i++) { ShaderData data; data.type = vMeshAttributes[i].type; data.name = vMeshAttributes[i].name; SMeshInformation* meshInfo = new SMeshInformation; meshInfo->mesh = _mesh; meshInfo->meshAtt = &vMeshAttributes[i]; data.data = meshInfo; data.component = this; _shaderData.push_back(data); } }
kore::MeshComponent::~MeshComponent(void) { destroyAttributes(); }
XmlTag::~XmlTag() { destroyAttributes(); destroyChildren(); }