Esempio n. 1
0
ShadowMap   *ShadowMap::createWithMapSize(const Size &mapSize)
{
	ShadowMap *shadowMap = new ShadowMap();
	if (!shadowMap->initWithMapSize(mapSize))
	{
		shadowMap->release();
		shadowMap = nullptr;
	}
	return shadowMap;
}
Esempio n. 2
0
ShadowMap    *ShadowMap::createWithMapLayer(const Size &mapSize, const int numberOfLayer)
{
	ShadowMap *map = new ShadowMap();
	if (!map->initWithMapLayer(mapSize, numberOfLayer))
	{
		map->release();
		map = nullptr;
	}
	return map;
}