/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
namespace SceneLoader
{
-
EnvironmentDefinition::RawData
- EnvironmentDefinition::LoadRaw(const std::string& environmentsPath) const
+EnvironmentDefinition::LoadRaw(const std::string& environmentsPath) const
{
RawData raw;
- auto loadFn = [&environmentsPath](const std::string& path, CubeData& cd) {
- if (path.empty())
+ auto loadFn = [&environmentsPath](const std::string& path, CubeData& cd) {
+ if(path.empty())
{
cd.data.resize(6);
- for (auto& face : cd.data)
+ for(auto& face : cd.data)
{
- face.push_back(PixelData::New(new uint8_t[3]{ 0xff, 0xff, 0xff }, 3, 1, 1, Pixel::RGB888, PixelData::DELETE_ARRAY));
+ face.push_back(PixelData::New(new uint8_t[3]{0xff, 0xff, 0xff}, 3, 1, 1, Pixel::RGB888, PixelData::DELETE_ARRAY));
}
}
else if(!LoadCubeMapData(environmentsPath + path, cd))
{
- ExceptionFlinger(ASSERT_LOCATION) << "Failed to load cubemap texture from '" <<
- path << "'.";
+ ExceptionFlinger(ASSERT_LOCATION) << "Failed to load cubemap texture from '" << path << "'.";
}
};
Textures textures;
// This texture should have 6 faces and only one mipmap
- if (!raw.mDiffuse.data.empty())
+ if(!raw.mDiffuse.data.empty())
{
textures.mDiffuse = raw.mDiffuse.CreateTexture();
}
// This texture should have 6 faces and 6 mipmaps
- if (!raw.mSpecular.data.empty())
+ if(!raw.mSpecular.data.empty())
{
textures.mSpecular = raw.mSpecular.CreateTexture();
}
return textures;
}
-}
-}
+} // namespace SceneLoader
+} // namespace Dali