Skip to content

Commit

Permalink
Hydrogent: moved HnTextureRegistry.hpp and HnGeometryPool.hpp from in…
Browse files Browse the repository at this point in the history
…terface to include
  • Loading branch information
TheMostDiligent committed Oct 19, 2024
1 parent 0bf998a commit c872a2c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Hydrogent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ set(INCLUDE
include/HnTextureUtils.hpp
include/HnMeshUtils.hpp
include/HnTextureIdentifier.hpp
include/HnTextureRegistry.hpp
include/HnGeometryPool.hpp
include/Computations/HnExtComputationImpl.hpp
include/Computations/HnSkinningComputation.hpp
)
Expand All @@ -81,8 +83,6 @@ set(INTERFACE
interface/HnFrameRenderTargets.hpp
interface/HnTokens.hpp
interface/HnTypes.hpp
interface/HnTextureRegistry.hpp
interface/HnGeometryPool.hpp
interface/Tasks/HnTask.hpp
interface/Tasks/HnCopySelectionDepthTask.hpp
interface/Tasks/HnBeginFrameTask.hpp
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions Hydrogent/interface/HnRenderDelegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

#include "entt/entity/registry.hpp"

#include "HnGeometryPool.hpp"
#include "HnTypes.hpp"

namespace Diligent
Expand All @@ -63,6 +62,7 @@ class HnLight;
class HnRenderParam;
class HnShadowMapManager;
class HnTextureRegistry;
class HnGeometryPool;

/// Memory usage statistics of the render delegate.
struct HnRenderDelegateMemoryStats
Expand Down Expand Up @@ -365,7 +365,7 @@ class HnRenderDelegate final : public pxr::HdRenderDelegate
virtual bool IsParallelSyncEnabled(pxr::TfToken primType) const override final;

HnTextureRegistry& GetTextureRegistry() { return *m_TextureRegistry; }
HnGeometryPool& GetGeometryPool() { return m_GeometryPool; }
HnGeometryPool& GetGeometryPool() { return *m_GeometryPool; }
HnShadowMapManager* GetShadowMapManager() const { return m_ShadowMapManager.get(); }

const pxr::SdfPath* GetRPrimId(Uint32 UID) const;
Expand Down Expand Up @@ -435,7 +435,7 @@ class HnRenderDelegate final : public pxr::HdRenderDelegate
Uint32 m_ShadowPassFrameAttribsAlignedSize = 0;

std::shared_ptr<HnTextureRegistry> m_TextureRegistry;
HnGeometryPool m_GeometryPool;
std::unique_ptr<HnGeometryPool> m_GeometryPool;
std::unique_ptr<HnRenderParam> m_RenderParam;
std::unique_ptr<HnShadowMapManager> m_ShadowMapManager;

Expand Down
11 changes: 9 additions & 2 deletions Hydrogent/src/HnRenderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "HnFrameRenderTargets.hpp"
#include "HnShadowMapManager.hpp"
#include "HnTextureRegistry.hpp"
#include "HnGeometryPool.hpp"

#include "DebugUtilities.hpp"
#include "GraphicsUtilities.h"
Expand Down Expand Up @@ -340,7 +341,13 @@ HnRenderDelegate::HnRenderDelegate(const CreateInfo& CI) :
CI.TextureLoadBudget,
}),
},
m_GeometryPool{CI.pDevice, *m_ResourceMgr, CI.UseVertexPool, CI.UseIndexPool},
m_GeometryPool{
std::make_unique<HnGeometryPool>(
CI.pDevice,
*m_ResourceMgr,
CI.UseVertexPool,
CI.UseIndexPool),
},
m_RenderParam{
std::make_unique<HnRenderParam>(
CI.UseVertexPool,
Expand Down Expand Up @@ -581,7 +588,7 @@ void HnRenderDelegate::CommitResources(pxr::HdChangeTracker* tracker)
m_ResourceMgr->UpdateIndexBuffer(m_pDevice, m_pContext);

m_TextureRegistry->Commit(m_pContext);
m_GeometryPool.Commit(m_pContext);
m_GeometryPool->Commit(m_pContext);
if (m_ShadowMapManager)
{
m_ShadowMapManager->Commit(m_pDevice, m_pContext);
Expand Down

0 comments on commit c872a2c

Please sign in to comment.