void PartResource::readMaterial(slim::XmlNode* node, void* param0, void* param1)
{
	assert(node != NULL);

	IResource* resource = NULL;
	slim::XmlAttribute* filenameAttr = node->findAttribute(GT("filename"));
	if (filenameAttr == NULL)
	{
		//embedded material data, create resource from factory
		assert(g_resourceFactory != NULL);
		resource = g_resourceFactory->createResource(getResourceUrl(), RES_TYPE_MATERIAL, param0, param1, false);
		MaterialResource* materialResource = static_cast<MaterialResource*>(resource);
		materialResource->importXmlNode(node);
		materialResource->setResourceState(RES_STATE_COMPLETE);
		materialResource->grab();
	}
	else
	{
		resource = grabChildResource(RES_TYPE_MATERIAL, filenameAttr->getValue<const Char*>(), param0, param1);
	}
	m_materialResources.push_back(static_cast<MaterialResource*>(resource));
}
Beispiel #2
0
String IdeSkin::getFaviconUrl() const
{
	return getResourceUrl(utils::makeFilePath(OS_SKIN_PATH_ICONS, OS_FAVICON));
}