[Tizen] Clean up Scene3D namespace and header definition
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / loader / model-loader.cpp
index 5ca930f..2f5c34e 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/loader/dli-loader-impl.h>
+#include <dali-scene3d/internal/loader/glb-loader-impl.h>
 #include <dali-scene3d/internal/loader/gltf2-loader-impl.h>
 #include <dali-scene3d/internal/loader/model-loader-impl.h>
 
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+namespace Dali::Scene3D::Loader
 {
 namespace
 {
 static constexpr std::string_view OBJ_EXTENSION      = ".obj";
 static constexpr std::string_view GLTF_EXTENSION     = ".gltf";
+static constexpr std::string_view GLB_EXTENSION      = ".glb";
 static constexpr std::string_view DLI_EXTENSION      = ".dli";
 static constexpr std::string_view METADATA_EXTENSION = "metadata";
 } // namespace
@@ -118,6 +116,10 @@ void ModelLoader::CreateModelLoader()
   {
     mImpl = std::make_shared<Dali::Scene3D::Loader::Internal::Gltf2LoaderImpl>();
   }
+  else if(extension == GLB_EXTENSION)
+  {
+    mImpl = std::make_shared<Dali::Scene3D::Loader::Internal::GlbLoaderImpl>();
+  }
   else
   {
     DALI_LOG_ERROR("Not supported model format : %s\n", extension.c_str());
@@ -150,6 +152,4 @@ void ModelLoader::LoadResource(Dali::Scene3D::Loader::ResourceBundle::PathProvid
   }
 }
 
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader