From c2b363272553e8061bda59955c97390454d41663 Mon Sep 17 00:00:00 2001 From: Zaven Muradyan Date: Thu, 5 Sep 2024 15:21:26 -0700 Subject: [PATCH] Expose getShadowType on View. (#8106) 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); }