Beispiel #1
0
void LandscapePropertyControl::GenerateFullTiledTexture(DAVA::BaseObject *object, void *userData, void *callerData)
{
    LandscapeNode *landscape = dynamic_cast<LandscapeNode*> (currentSceneNode);
    String texPathname = landscape->SaveFullTiledTexture();
    
    propertyList->SetFilepathPropertyValue(String("property.landscape.texture.tiledtexture"), texPathname);
    landscape->SetTexture(LandscapeNode::TEXTURE_TILE_FULL, texPathname);
}
void LandscapePropertyControl::GenerateFullTiledTexture(DAVA::BaseObject *object, void *userData, void *callerData)
{
	LandscapeNode *landscape = GetLandscape();
	if (!landscape)
		return;

    String texPathname = landscape->SaveFullTiledTexture();
    String descriptorPathname = TextureDescriptor::GetDescriptorPathname(texPathname);
    
    TextureDescriptor *descriptor = TextureDescriptor::CreateFromFile(descriptorPathname);
    if(!descriptor)
    {
        descriptor = new TextureDescriptor();
        descriptor->pathname = descriptorPathname;
        descriptor->Save();
    }
    
    propertyList->SetFilepathPropertyValue(String("property.landscape.texture.tiledtexture"), descriptor->pathname);
    landscape->SetTexture(LandscapeNode::TEXTURE_TILE_FULL, descriptor->pathname);
    
    SafeRelease(descriptor);
}