Skip to content

Commit

Permalink
HnTaskManager: added functions to enable/disable environment map and …
Browse files Browse the repository at this point in the history
…axes rendering
  • Loading branch information
TheMostDiligent committed Nov 7, 2023
1 parent 43ab92e commit ae53828
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Hydrogent/interface/Tasks/HnTaskManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,21 @@ class HnTaskManager
/// Enables or disables the tasks associated with the specified material tag.
void EnableMaterial(const pxr::TfToken& MaterialTag, bool Enable);

/// Enables or disables environment map rendering.
void EnableEnvironmentMap(bool Enable);

/// Returns true if environment map rendering is enabled.
bool IsEnvironmentMapEnabled() const;

/// Enables or disables axes rendering.
void EnableAxes(bool Enable);

/// Returns true if the tasks associated with the specified material tag are enabled.
bool IsMaterialEnabled(const pxr::TfToken& MaterialTag) const;

/// Returns true if axes rendering is enabled.
bool AreAxesEnabled() const;

private:
pxr::SdfPath GetRenderRprimsTaskId(const pxr::TfToken& MaterialTag, const HnRenderPassParams& RenderPassParams) const;

Expand Down
20 changes: 20 additions & 0 deletions Hydrogent/src/Tasks/HnTaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,26 @@ void HnTaskManager::SetPostProcessParams(const HnPostProcessTaskParams& Params)
}
}

void HnTaskManager::EnableEnvironmentMap(bool Enable)
{
EnableTask(TaskUID_RenderEnvMap, Enable);
}

bool HnTaskManager::IsEnvironmentMapEnabled() const
{
return IsTaskEnabled(TaskUID_RenderEnvMap);
}

void HnTaskManager::EnableAxes(bool Enable)
{
EnableTask(TaskUID_RenderAxes, Enable);
}

bool HnTaskManager::AreAxesEnabled() const
{
return IsTaskEnabled(TaskUID_RenderAxes);
}

} // namespace USD

} // namespace Diligent

0 comments on commit ae53828

Please sign in to comment.