From c3291f672e28bbc332ef2e0e852412d8ff22f6e7 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Thu, 19 Sep 2024 09:12:16 +0800 Subject: [PATCH] use SceneManager::LAYERS enum for Overlay --- thermion_dart/native/src/GridOverlay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thermion_dart/native/src/GridOverlay.cpp b/thermion_dart/native/src/GridOverlay.cpp index f7a358fd..6d3a59a6 100644 --- a/thermion_dart/native/src/GridOverlay.cpp +++ b/thermion_dart/native/src/GridOverlay.cpp @@ -8,6 +8,7 @@ #include #include "material/grid.h" +#include "SceneManager.hpp" #include "Log.hpp" namespace thermion_filament { @@ -92,7 +93,7 @@ GridOverlay::GridOverlay(Engine &engine) : _engine(engine) .material(0, _materialInstance) .geometry(0, RenderableManager::PrimitiveType::LINES, vb, ib, 0, vertexCount) .priority(6) - .layerMask(0xFF, 4) + .layerMask(0xFF, 1u << SceneManager::LAYERS::OVERLAY) .culling(false) .receiveShadows(false) .castShadows(false) @@ -172,7 +173,7 @@ RenderableManager::Builder(1) {sphereRadius, sphereRadius, sphereRadius}}) .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, sphereVb, sphereIb, 0, indexCount) .priority(6) - .layerMask(0xFF, 4) + .layerMask(0xFF, 1u << SceneManager::LAYERS::OVERLAY) .culling(false) .receiveShadows(false) .castShadows(false)