Esempio n. 1
0
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);
  }
}
Esempio n. 2
0
kore::MeshComponent::~MeshComponent(void) {
  destroyAttributes();
}
Esempio n. 3
0
XmlTag::~XmlTag() {
	destroyAttributes();
	destroyChildren();
}