Skip to content

Commit

Permalink
Expose getShadowType on View. (#8106)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
voithos authored Sep 5, 2024
1 parent 8c91b1b commit c2b3632
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions filament/include/filament/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 4 additions & 0 deletions filament/src/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c2b3632

Please sign in to comment.