示例#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);
  }
}
示例#2
0
kore::MeshComponent::~MeshComponent(void) {
  destroyAttributes();
}
示例#3
0
文件: xml_tag.cpp 项目: WST/xpbot
XmlTag::~XmlTag() {
	destroyAttributes();
	destroyChildren();
}