diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a30284e5d0..86c4537e13 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -9,6 +9,9 @@ A new header is inserted each time a *tag* is created. - gltfio: fix morphing for un-packed accessors - gltfio: ubershaders are now packaged into flexible archives [⚠️ **API Change**] +- gltfio: namespace now lives under Filament [⚠️ **API Change**] +- gltfio: UbershaderLoader renamed to UbershaderProvider [⚠️ **API Change**] +- gltfio: MaterialGenerator renamed to JitShaderProvider [⚠️ **API Change**] - gltfio: remove poorly maintained lite flavor - engine: disable user scissor while rendering the Shadow Maps (#5607) - engine: merge identical backend RenderPrimitives together diff --git a/android/gltfio-android/src/main/cpp/Animator.cpp b/android/gltfio-android/src/main/cpp/Animator.cpp index 800aed68c8..eade9634de 100644 --- a/android/gltfio-android/src/main/cpp/Animator.cpp +++ b/android/gltfio-android/src/main/cpp/Animator.cpp @@ -20,7 +20,7 @@ using namespace filament; using namespace filament::math; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; extern "C" JNIEXPORT void JNICALL diff --git a/android/gltfio-android/src/main/cpp/AssetLoader.cpp b/android/gltfio-android/src/main/cpp/AssetLoader.cpp index 7bac114e88..6f3f16b9a6 100644 --- a/android/gltfio-android/src/main/cpp/AssetLoader.cpp +++ b/android/gltfio-android/src/main/cpp/AssetLoader.cpp @@ -30,7 +30,7 @@ #include "MaterialKey.h" using namespace filament; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; class JavaMaterialProvider : public MaterialProvider { diff --git a/android/gltfio-android/src/main/cpp/FilamentAsset.cpp b/android/gltfio-android/src/main/cpp/FilamentAsset.cpp index 2dfbcd0cf3..9721a1448c 100644 --- a/android/gltfio-android/src/main/cpp/FilamentAsset.cpp +++ b/android/gltfio-android/src/main/cpp/FilamentAsset.cpp @@ -20,7 +20,7 @@ using namespace filament; using namespace filament::math; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; extern "C" JNIEXPORT jint JNICALL diff --git a/android/gltfio-android/src/main/cpp/FilamentInstance.cpp b/android/gltfio-android/src/main/cpp/FilamentInstance.cpp index 45ea5ec7cb..62f9f7bbab 100644 --- a/android/gltfio-android/src/main/cpp/FilamentInstance.cpp +++ b/android/gltfio-android/src/main/cpp/FilamentInstance.cpp @@ -20,7 +20,7 @@ #include -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; extern "C" JNIEXPORT jint JNICALL diff --git a/android/gltfio-android/src/main/cpp/MaterialKey.cpp b/android/gltfio-android/src/main/cpp/MaterialKey.cpp index 554368fb7a..21d1213028 100644 --- a/android/gltfio-android/src/main/cpp/MaterialKey.cpp +++ b/android/gltfio-android/src/main/cpp/MaterialKey.cpp @@ -20,7 +20,7 @@ #include "MaterialKey.h" -using namespace gltfio; +using namespace filament::gltfio; MaterialKeyHelper& MaterialKeyHelper::get() { static MaterialKeyHelper helper; diff --git a/android/gltfio-android/src/main/cpp/MaterialKey.h b/android/gltfio-android/src/main/cpp/MaterialKey.h index 10406c9dbc..9fea0e3b6a 100644 --- a/android/gltfio-android/src/main/cpp/MaterialKey.h +++ b/android/gltfio-android/src/main/cpp/MaterialKey.h @@ -22,10 +22,12 @@ class MaterialKeyHelper { public: + using MaterialKey = filament::gltfio::MaterialKey; + static MaterialKeyHelper& get(); - void copy(JNIEnv* env, gltfio::MaterialKey& dst, jobject src); - void copy(JNIEnv* env, jobject dst, const gltfio::MaterialKey& src); + void copy(JNIEnv* env, MaterialKey& dst, jobject src); + void copy(JNIEnv* env, jobject dst, const MaterialKey& src); void init(JNIEnv* env); // called only from the Java static class constructor diff --git a/android/gltfio-android/src/main/cpp/ResourceLoader.cpp b/android/gltfio-android/src/main/cpp/ResourceLoader.cpp index 1ce4a681e3..86f884a7c2 100644 --- a/android/gltfio-android/src/main/cpp/ResourceLoader.cpp +++ b/android/gltfio-android/src/main/cpp/ResourceLoader.cpp @@ -26,7 +26,7 @@ #include "common/NioUtils.h" using namespace filament; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; static void destroy(void*, size_t, void *userData) { diff --git a/android/gltfio-android/src/main/cpp/UbershaderProvider.cpp b/android/gltfio-android/src/main/cpp/UbershaderProvider.cpp index dac6098972..6d91e9157c 100644 --- a/android/gltfio-android/src/main/cpp/UbershaderProvider.cpp +++ b/android/gltfio-android/src/main/cpp/UbershaderProvider.cpp @@ -23,7 +23,7 @@ #include "MaterialKey.h" using namespace filament; -using namespace gltfio; +using namespace filament::gltfio; extern "C" JNIEXPORT jlong JNICALL Java_com_google_android_filament_gltfio_UbershaderProvider_nCreateUbershaderProvider(JNIEnv*, jclass, diff --git a/ios/samples/gltf-viewer/gltf-viewer/FILModelView.h b/ios/samples/gltf-viewer/gltf-viewer/FILModelView.h index 75f7cf065a..43d0a36edf 100644 --- a/ios/samples/gltf-viewer/gltf-viewer/FILModelView.h +++ b/ios/samples/gltf-viewer/gltf-viewer/FILModelView.h @@ -23,7 +23,7 @@ class View; class Renderer; }; -namespace gltfio { +namespace filament::gltfio { class Animator; class FilamentAsset; }; @@ -56,8 +56,8 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, readonly) filament::View* view; @property(nonatomic, readonly) filament::Renderer* renderer; -@property(nonatomic, readonly) gltfio::FilamentAsset* _Nullable asset; -@property(nonatomic, readonly) gltfio::Animator* _Nullable animator; +@property(nonatomic, readonly) filament::gltfio::FilamentAsset* _Nullable asset; +@property(nonatomic, readonly) filament::gltfio::Animator* _Nullable animator; @property(nonatomic, readwrite) float cameraFocalLength; diff --git a/ios/samples/gltf-viewer/gltf-viewer/FILModelView.mm b/ios/samples/gltf-viewer/gltf-viewer/FILModelView.mm index 8245148570..82b6697b3b 100644 --- a/ios/samples/gltf-viewer/gltf-viewer/FILModelView.mm +++ b/ios/samples/gltf-viewer/gltf-viewer/FILModelView.mm @@ -47,7 +47,7 @@ using namespace filament; using namespace utils; -using namespace gltfio; +using namespace filament::gltfio; using namespace camutils; const double kNearPlane = 0.05; // 5 cm diff --git a/ios/samples/hello-gltf/hello-gltf/FilamentView/App.cpp b/ios/samples/hello-gltf/hello-gltf/FilamentView/App.cpp index 6e9439bdda..e6f41738b6 100644 --- a/ios/samples/hello-gltf/hello-gltf/FilamentView/App.cpp +++ b/ios/samples/hello-gltf/hello-gltf/FilamentView/App.cpp @@ -61,7 +61,7 @@ App::~App() { app.assetLoader->destroyAsset(app.asset); app.materialProvider->destroyMaterials(); delete app.materialProvider; - gltfio::AssetLoader::destroy(&app.assetLoader); + filament::gltfio::AssetLoader::destroy(&app.assetLoader); engine->destroy(renderer); engine->destroy(scene); @@ -122,8 +122,8 @@ void App::setupIbl() { } void App::setupMesh() { - app.materialProvider = gltfio::createUbershaderProvider(engine); - app.assetLoader = gltfio::AssetLoader::create({engine, app.materialProvider, nullptr}); + app.materialProvider = filament::gltfio::createUbershaderProvider(engine); + app.assetLoader = filament::gltfio::AssetLoader::create({engine, app.materialProvider, nullptr}); // Load the glTF file. std::ifstream in(resourcePath.concat(utils::Path("DamagedHelmet.glb")), std::ifstream::in); @@ -137,7 +137,7 @@ void App::setupMesh() { } app.asset = app.assetLoader->createAssetFromBinary(buffer.data(), static_cast(size)); - gltfio::ResourceLoader({ + filament::gltfio::ResourceLoader({ .engine = engine, .normalizeSkinningWeights = true, .recomputeBoundingBoxes = false diff --git a/ios/samples/hello-gltf/hello-gltf/FilamentView/App.h b/ios/samples/hello-gltf/hello-gltf/FilamentView/App.h index 5e95e388d5..814ed49f73 100644 --- a/ios/samples/hello-gltf/hello-gltf/FilamentView/App.h +++ b/ios/samples/hello-gltf/hello-gltf/FilamentView/App.h @@ -36,7 +36,7 @@ using namespace filament::math; using utils::Entity; using utils::EntityManager; -namespace gltfio { +namespace filament::gltfio { class AssetLoader; class MaterialProvider; class FilamentAsset; @@ -80,9 +80,9 @@ private: Skybox* skybox = nullptr; Entity sun; - gltfio::AssetLoader* assetLoader; - gltfio::MaterialProvider* materialProvider; - gltfio::FilamentAsset* asset; + filament::gltfio::AssetLoader* assetLoader; + filament::gltfio::MaterialProvider* materialProvider; + filament::gltfio::FilamentAsset* asset; } app; CameraManipulator cameraManipulator; diff --git a/libs/gltfio/include/gltfio/Animator.h b/libs/gltfio/include/gltfio/Animator.h index bc15bac2f7..072d532a84 100644 --- a/libs/gltfio/include/gltfio/Animator.h +++ b/libs/gltfio/include/gltfio/Animator.h @@ -20,7 +20,7 @@ #include #include -namespace gltfio { +namespace filament::gltfio { struct FFilamentAsset; struct FFilamentInstance; @@ -114,6 +114,6 @@ private: AnimatorImpl* mImpl; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_ANIMATOR_H diff --git a/libs/gltfio/include/gltfio/AssetLoader.h b/libs/gltfio/include/gltfio/AssetLoader.h index 09e5b9db2b..327e4c9bc7 100644 --- a/libs/gltfio/include/gltfio/AssetLoader.h +++ b/libs/gltfio/include/gltfio/AssetLoader.h @@ -34,7 +34,7 @@ namespace utils { /** * Loader and pipeline for glTF 2.0 assets. */ -namespace gltfio { +namespace filament::gltfio { class NodeManager; @@ -246,6 +246,6 @@ public: /*! \endcond */ }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_ASSETLOADER_H diff --git a/libs/gltfio/include/gltfio/FilamentAsset.h b/libs/gltfio/include/gltfio/FilamentAsset.h index 45013768cb..8165bbb6a1 100644 --- a/libs/gltfio/include/gltfio/FilamentAsset.h +++ b/libs/gltfio/include/gltfio/FilamentAsset.h @@ -32,7 +32,7 @@ namespace filament { class Scene; } -namespace gltfio { +namespace filament::gltfio { class Animator; class FilamentInstance; @@ -351,6 +351,6 @@ public: /*! \endcond */ }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_FILAMENTASSET_H diff --git a/libs/gltfio/include/gltfio/FilamentInstance.h b/libs/gltfio/include/gltfio/FilamentInstance.h index 1f1509e38b..60d8e8d960 100644 --- a/libs/gltfio/include/gltfio/FilamentInstance.h +++ b/libs/gltfio/include/gltfio/FilamentInstance.h @@ -20,7 +20,7 @@ #include #include -namespace gltfio { +namespace filament::gltfio { class Animator; class FilamentAsset; @@ -76,6 +76,6 @@ public: Animator* getAnimator() noexcept; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_FILAMENTINSTANCE_H diff --git a/libs/gltfio/include/gltfio/MaterialProvider.h b/libs/gltfio/include/gltfio/MaterialProvider.h index f11f7dbcc1..602ff3f5e3 100644 --- a/libs/gltfio/include/gltfio/MaterialProvider.h +++ b/libs/gltfio/include/gltfio/MaterialProvider.h @@ -26,7 +26,7 @@ #include #include -namespace gltfio { +namespace filament::gltfio { enum class AlphaMode : uint8_t { OPAQUE, @@ -203,6 +203,6 @@ MaterialProvider* createJitShaderProvider(filament::Engine* engine, bool optimiz UTILS_PUBLIC MaterialProvider* createUbershaderProvider(filament::Engine* engine); -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_MATERIALPROVIDER_H diff --git a/libs/gltfio/include/gltfio/NodeManager.h b/libs/gltfio/include/gltfio/NodeManager.h index 3bb739b490..04f7bd6d95 100644 --- a/libs/gltfio/include/gltfio/NodeManager.h +++ b/libs/gltfio/include/gltfio/NodeManager.h @@ -29,7 +29,7 @@ namespace utils { class Entity; } // namespace utils -namespace gltfio { +namespace filament::gltfio { class FNodeManager; @@ -104,7 +104,7 @@ public: NodeManager& operator=(NodeManager&&) = delete; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_NODEMANAGER_H diff --git a/libs/gltfio/include/gltfio/ResourceLoader.h b/libs/gltfio/include/gltfio/ResourceLoader.h index d8fbe7360e..4cc23c659a 100644 --- a/libs/gltfio/include/gltfio/ResourceLoader.h +++ b/libs/gltfio/include/gltfio/ResourceLoader.h @@ -27,7 +27,7 @@ namespace filament { class Engine; } -namespace gltfio { +namespace filament::gltfio { struct FFilamentAsset; class AssetPool; @@ -169,7 +169,7 @@ private: Impl* pImpl; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_RESOURCELOADER_H diff --git a/libs/gltfio/include/gltfio/TextureProvider.h b/libs/gltfio/include/gltfio/TextureProvider.h index db4c896a52..2cabe1e3d4 100644 --- a/libs/gltfio/include/gltfio/TextureProvider.h +++ b/libs/gltfio/include/gltfio/TextureProvider.h @@ -27,7 +27,7 @@ namespace filament { class Texture; } -namespace gltfio { +namespace filament::gltfio { /** * TextureProvider is an interface that allows clients to implement their own texture decoding @@ -175,6 +175,6 @@ TextureProvider* createStbProvider(filament::Engine* engine); */ TextureProvider* createKtx2Provider(filament::Engine* engine); -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_TEXTUREPROVIDER_H diff --git a/libs/gltfio/include/gltfio/math.h b/libs/gltfio/include/gltfio/math.h index f94d3cc78a..a971122dfe 100644 --- a/libs/gltfio/include/gltfio/math.h +++ b/libs/gltfio/include/gltfio/math.h @@ -23,7 +23,7 @@ #include #include -namespace gltfio { +namespace filament::gltfio { template UTILS_PUBLIC T cubicSpline(const T& vert0, const T& tang0, const T& vert1, const T& tang1, float t) { @@ -121,6 +121,6 @@ inline filament::math::mat3f matrixFromUvTransform(const float offset[2], float return filament::math::mat3f(sx * c, sx * s, tx, -sy * s, sy * c, ty, 0.0f, 0.0f, 1.0f); }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_MATH_H diff --git a/libs/gltfio/src/Animator.cpp b/libs/gltfio/src/Animator.cpp index 47c4ea8aa6..159400e874 100644 --- a/libs/gltfio/src/Animator.cpp +++ b/libs/gltfio/src/Animator.cpp @@ -42,7 +42,7 @@ using namespace filament::math; using namespace std; using namespace utils; -namespace gltfio { +namespace filament::gltfio { using TimeValues = map; using SourceValues = vector; @@ -558,4 +558,4 @@ void AnimatorImpl::applyAnimation(const Channel& channel, float t, size_t prevIn transformManager->setTransform(node, xform); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/AssetLoader.cpp b/libs/gltfio/src/AssetLoader.cpp index ea76e4ac24..1bbf45ff56 100644 --- a/libs/gltfio/src/AssetLoader.cpp +++ b/libs/gltfio/src/AssetLoader.cpp @@ -59,7 +59,7 @@ using namespace filament; using namespace filament::math; using namespace utils; -namespace gltfio { +namespace filament::gltfio { using SceneMask = NodeManager::SceneMask; @@ -1456,4 +1456,4 @@ MaterialProvider& AssetLoader::getMaterialProvider() noexcept { return upcast(this)->mMaterials; } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/DependencyGraph.cpp b/libs/gltfio/src/DependencyGraph.cpp index 9a92dbf7c6..e43e732ead 100644 --- a/libs/gltfio/src/DependencyGraph.cpp +++ b/libs/gltfio/src/DependencyGraph.cpp @@ -19,7 +19,7 @@ using namespace filament; using namespace utils; -namespace gltfio { +namespace filament::gltfio { size_t DependencyGraph::popRenderables(Entity* result, size_t count) noexcept { if (result == nullptr) { @@ -136,4 +136,4 @@ DependencyGraph::TextureNode* DependencyGraph::getStatus(Texture* texture) { return iter->second.get(); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/DependencyGraph.h b/libs/gltfio/src/DependencyGraph.h index 8320b9ee4e..0e3ef7d71c 100644 --- a/libs/gltfio/src/DependencyGraph.h +++ b/libs/gltfio/src/DependencyGraph.h @@ -30,7 +30,7 @@ namespace filament { class Texture; } -namespace gltfio { +namespace filament::gltfio { /** * Internal graph that enables FilamentAsset to discover "ready-to-render" entities by tracking @@ -132,6 +132,6 @@ private: bool mFinalized = false; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_DEPENDENCY_GRAPH_H diff --git a/libs/gltfio/src/DracoCache.cpp b/libs/gltfio/src/DracoCache.cpp index b43c00e90f..40b2c12a98 100644 --- a/libs/gltfio/src/DracoCache.cpp +++ b/libs/gltfio/src/DracoCache.cpp @@ -30,7 +30,7 @@ using std::vector; using namespace utils; -namespace gltfio { +namespace filament::gltfio { DracoMesh* DracoCache::findOrCreateMesh(const cgltf_buffer_view* key) { auto iter = mCache.find(key); @@ -222,4 +222,4 @@ bool DracoMesh::getVertexAttributes(uint32_t attributeId, cgltf_accessor* target #endif -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/DracoCache.h b/libs/gltfio/src/DracoCache.h index 88963da8d7..6332676476 100644 --- a/libs/gltfio/src/DracoCache.h +++ b/libs/gltfio/src/DracoCache.h @@ -27,7 +27,7 @@ #define GLTFIO_DRACO_SUPPORTED 0 #endif -namespace gltfio { +namespace filament::gltfio { class DracoMesh; @@ -66,6 +66,6 @@ private: std::unique_ptr mDetails; }; -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_DRACO_CACHE_H diff --git a/libs/gltfio/src/FFilamentAsset.h b/libs/gltfio/src/FFilamentAsset.h index da94ecd914..2f091b3da4 100644 --- a/libs/gltfio/src/FFilamentAsset.h +++ b/libs/gltfio/src/FFilamentAsset.h @@ -62,7 +62,7 @@ namespace utils { class EntityManager; } -namespace gltfio { +namespace filament::gltfio { class Animator; class Wireframe; @@ -331,6 +331,6 @@ struct FFilamentAsset : public FilamentAsset { FILAMENT_UPCAST(FilamentAsset) -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_FFILAMENTASSET_H diff --git a/libs/gltfio/src/FFilamentInstance.h b/libs/gltfio/src/FFilamentInstance.h index 8423147e1c..805dc0d960 100644 --- a/libs/gltfio/src/FFilamentInstance.h +++ b/libs/gltfio/src/FFilamentInstance.h @@ -38,7 +38,7 @@ namespace filament { class MaterialInstance; } -namespace gltfio { +namespace filament::gltfio { struct FFilamentAsset; class Animator; @@ -91,6 +91,6 @@ struct FFilamentInstance : public FilamentInstance { FILAMENT_UPCAST(FilamentInstance) -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_FFILAMENTINSTANCE_H diff --git a/libs/gltfio/src/FNodeManager.h b/libs/gltfio/src/FNodeManager.h index 22ab853c1f..9a47aa0620 100644 --- a/libs/gltfio/src/FNodeManager.h +++ b/libs/gltfio/src/FNodeManager.h @@ -26,7 +26,7 @@ #include #include -namespace gltfio { +namespace filament::gltfio { class UTILS_PRIVATE FNodeManager : public NodeManager { public: @@ -134,6 +134,6 @@ private: FILAMENT_UPCAST(NodeManager) -} // namespace gltfio +} // namespace filament::gltfio #endif // GLTFIO_FNODEMANAGER_H diff --git a/libs/gltfio/src/FilamentAsset.cpp b/libs/gltfio/src/FilamentAsset.cpp index 6a37330516..99dfcce181 100644 --- a/libs/gltfio/src/FilamentAsset.cpp +++ b/libs/gltfio/src/FilamentAsset.cpp @@ -30,7 +30,7 @@ using namespace filament; using namespace utils; -namespace gltfio { +namespace filament::gltfio { FFilamentAsset::~FFilamentAsset() { releaseSourceData(); @@ -461,4 +461,4 @@ void FilamentAsset::addEntitiesToScene(Scene& targetScene, const Entity* entitie upcast(this)->addEntitiesToScene(targetScene, entities, count, sceneFilter); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/FilamentInstance.cpp b/libs/gltfio/src/FilamentInstance.cpp index 4b4ca7d880..82f9ee51ba 100644 --- a/libs/gltfio/src/FilamentInstance.cpp +++ b/libs/gltfio/src/FilamentInstance.cpp @@ -24,7 +24,7 @@ using namespace filament; using namespace utils; -namespace gltfio { +namespace filament::gltfio { Animator* FFilamentInstance::getAnimator() const noexcept { assert_invariant(animator); @@ -98,4 +98,4 @@ Animator* FilamentInstance::getAnimator() noexcept { return upcast(this)->getAnimator(); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/JitShaderProvider.cpp b/libs/gltfio/src/JitShaderProvider.cpp index fe0dba915d..03b2d5c76e 100644 --- a/libs/gltfio/src/JitShaderProvider.cpp +++ b/libs/gltfio/src/JitShaderProvider.cpp @@ -26,7 +26,7 @@ using namespace filamat; using namespace filament; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; namespace { @@ -557,10 +557,10 @@ MaterialInstance* JitShaderProvider::createMaterialInstance(MaterialKey* config, } // anonymous namespace -namespace gltfio { +namespace filament::gltfio { MaterialProvider* createJitShaderProvider(filament::Engine* engine, bool optimizeShaders) { return new JitShaderProvider(engine, optimizeShaders); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/Ktx2Provider.cpp b/libs/gltfio/src/Ktx2Provider.cpp index f7e2b9d35a..b81c19d541 100644 --- a/libs/gltfio/src/Ktx2Provider.cpp +++ b/libs/gltfio/src/Ktx2Provider.cpp @@ -33,7 +33,7 @@ using std::atomic; using std::vector; using std::unique_ptr; -namespace gltfio { +namespace filament::gltfio { class Ktx2Provider final : public TextureProvider { public: @@ -250,4 +250,4 @@ TextureProvider* createKtx2Provider(Engine* engine) { return new Ktx2Provider(engine); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/MaterialProvider.cpp b/libs/gltfio/src/MaterialProvider.cpp index d07525fcaa..b42bd9a930 100644 --- a/libs/gltfio/src/MaterialProvider.cpp +++ b/libs/gltfio/src/MaterialProvider.cpp @@ -18,7 +18,7 @@ #include -namespace gltfio { +namespace filament::gltfio { bool operator==(const MaterialKey& k1, const MaterialKey& k2) { return @@ -182,4 +182,4 @@ void processShaderString(std::string* shader, const UvMap& uvmap, const Material replaceAll("${volumeThickness}", volumeThicknessUV); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/NodeManager.cpp b/libs/gltfio/src/NodeManager.cpp index af0b5b56d4..c3334e2b38 100644 --- a/libs/gltfio/src/NodeManager.cpp +++ b/libs/gltfio/src/NodeManager.cpp @@ -22,7 +22,7 @@ using namespace utils; -namespace gltfio { +namespace filament::gltfio { using Instance = NodeManager::Instance; @@ -80,4 +80,4 @@ bitset32 NodeManager::getSceneMembership(Instance ci) const noexcept { return upcast(this)->getSceneMembership(ci); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/ResourceLoader.cpp b/libs/gltfio/src/ResourceLoader.cpp index c43f69ff87..9880037e12 100644 --- a/libs/gltfio/src/ResourceLoader.cpp +++ b/libs/gltfio/src/ResourceLoader.cpp @@ -63,7 +63,7 @@ using filament::geometry::ComponentType; static const auto FREE_CALLBACK = [](void* mem, size_t, void*) { free(mem); }; -namespace gltfio { +namespace filament::gltfio { using BufferTextureCache = tsl::robin_map; using FilepathTextureCache = tsl::robin_map; @@ -1075,4 +1075,4 @@ void ResourceLoader::updateBoundingBoxes(FFilamentAsset* asset) const { asset->mBoundingBox = assetBounds; } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/StbProvider.cpp b/libs/gltfio/src/StbProvider.cpp index 93bf05c63f..dc60f61d51 100644 --- a/libs/gltfio/src/StbProvider.cpp +++ b/libs/gltfio/src/StbProvider.cpp @@ -33,7 +33,7 @@ using std::atomic; using std::vector; using std::unique_ptr; -namespace gltfio { +namespace filament::gltfio { class StbProvider final : public TextureProvider { public: @@ -258,4 +258,4 @@ TextureProvider* createStbProvider(Engine* engine) { return new StbProvider(engine); } -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/TangentsJob.cpp b/libs/gltfio/src/TangentsJob.cpp index a34929d383..6152387bd7 100644 --- a/libs/gltfio/src/TangentsJob.cpp +++ b/libs/gltfio/src/TangentsJob.cpp @@ -20,7 +20,7 @@ #include -using namespace gltfio; +using namespace filament::gltfio; using namespace filament; using namespace filament::math; diff --git a/libs/gltfio/src/TangentsJob.h b/libs/gltfio/src/TangentsJob.h index ca50a337c1..d4ea274da8 100644 --- a/libs/gltfio/src/TangentsJob.h +++ b/libs/gltfio/src/TangentsJob.h @@ -25,7 +25,7 @@ class MorphTargetBuffer; } -namespace gltfio { +namespace filament::gltfio { /** * Internal helper that examines a cgltf primitive and generates data suitable for Filament's @@ -69,4 +69,4 @@ struct TangentsJob { static void run(Params* params); }; -} // namespace gltfio +} // namespace filament::gltfio diff --git a/libs/gltfio/src/UbershaderProvider.cpp b/libs/gltfio/src/UbershaderProvider.cpp index 336cbc1e32..0db63fa2ce 100644 --- a/libs/gltfio/src/UbershaderProvider.cpp +++ b/libs/gltfio/src/UbershaderProvider.cpp @@ -31,7 +31,7 @@ using namespace filament; using namespace filament::math; using namespace filament::uberz; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; #if !defined(NDEBUG) @@ -284,13 +284,13 @@ MaterialInstance* UbershaderProvider::createMaterialInstance(MaterialKey* config } // anonymous namespace -namespace gltfio { +namespace filament::gltfio { MaterialProvider* createUbershaderProvider(filament::Engine* engine) { return new UbershaderProvider(engine); } -} // namespace gltfio +} // namespace filament::gltfio #if !defined(NDEBUG) diff --git a/libs/gltfio/src/Wireframe.cpp b/libs/gltfio/src/Wireframe.cpp index 8488e1e3ca..805e032751 100644 --- a/libs/gltfio/src/Wireframe.cpp +++ b/libs/gltfio/src/Wireframe.cpp @@ -37,7 +37,7 @@ using namespace utils; static const auto FREE_CALLBACK = [](void* mem, size_t, void*) { free(mem); }; -namespace gltfio { +namespace filament::gltfio { struct FFilamentAsset; diff --git a/libs/gltfio/src/Wireframe.h b/libs/gltfio/src/Wireframe.h index dc083561b3..aaf44bad2b 100644 --- a/libs/gltfio/src/Wireframe.h +++ b/libs/gltfio/src/Wireframe.h @@ -22,7 +22,7 @@ #include -namespace gltfio { +namespace filament::gltfio { struct FFilamentAsset; diff --git a/samples/gltf_instances.cpp b/samples/gltf_instances.cpp index e438074b5f..8abf51d497 100644 --- a/samples/gltf_instances.cpp +++ b/samples/gltf_instances.cpp @@ -49,7 +49,7 @@ using namespace filament; using namespace filament::math; using namespace filament::viewer; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; enum MaterialSource { diff --git a/samples/gltf_viewer.cpp b/samples/gltf_viewer.cpp index c3b82100f3..f54b97967d 100644 --- a/samples/gltf_viewer.cpp +++ b/samples/gltf_viewer.cpp @@ -63,7 +63,7 @@ using namespace filament; using namespace filament::math; using namespace filament::viewer; -using namespace gltfio; +using namespace filament::gltfio; using namespace utils; enum MaterialSource { diff --git a/web/filament-js/jsbindings.cpp b/web/filament-js/jsbindings.cpp index b0dc19e9b3..d2dc30e216 100644 --- a/web/filament-js/jsbindings.cpp +++ b/web/filament-js/jsbindings.cpp @@ -93,7 +93,7 @@ using namespace emscripten; using namespace filament; using namespace filamesh; using namespace geometry; -using namespace gltfio; +using namespace filament::gltfio; using namespace image; using namespace ktxreader;