From bfbe81d2a51ec033d92eeb662f1476971c46bda8 Mon Sep 17 00:00:00 2001 From: Zaven Muradyan Date: Thu, 5 Sep 2024 14:06:50 -0700 Subject: [PATCH] Expose getShadowType on View. While this method exists on FView, it is missing from View and thus not accessible for filament users. This adds a pass-through method on View. --- filament/include/filament/View.h | 7 +++++++ filament/src/View.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/filament/include/filament/View.h b/filament/include/filament/View.h index d4c9848de8f..139dcac7f40 100644 --- a/filament/include/filament/View.h +++ b/filament/include/filament/View.h @@ -570,6 +570,13 @@ class UTILS_PUBLIC View : public FilamentAPI { */ void setShadowType(ShadowType shadow) noexcept; + /** + * Returns the shadow mapping technique used by this View. + * + * @return value set by setShadowType(). + */ + ShadowType getShadowType() const noexcept; + /** * Sets VSM shadowing options that apply across the entire View. * diff --git a/filament/src/View.cpp b/filament/src/View.cpp index 65635f3f647..0d5d3aa61ca 100644 --- a/filament/src/View.cpp +++ b/filament/src/View.cpp @@ -193,6 +193,10 @@ void View::setShadowType(View::ShadowType shadow) noexcept { downcast(this)->setShadowType(shadow); } +View::ShadowType View::getShadowType() const noexcept { + return downcast(this)->getShadowType(); +} + void View::setVsmShadowOptions(VsmShadowOptions const& options) noexcept { downcast(this)->setVsmShadowOptions(options); }