Change GetUsableSubpasses to GetUsableSubpass

This commit is contained in:
Brandon Mak 2023-01-30 16:42:19 +08:00
parent f8bde9fc35
commit c45c469c8e
2 changed files with 11 additions and 1 deletions

View File

@ -1185,6 +1185,16 @@ namespace SHADE
return fontLibrary; return fontLibrary;
} }
Handle <SHSubpass> const& SHGraphicsSystem::GetUsableSubpass(std::string subpassName) const noexcept
{
if (usableSubpassesMapping.contains(subpassName))
{
return usableSubpassesMapping.at (subpassName);
}
else
return {};
}
Handle<SHVkPipeline> SHGraphicsSystem::createDebugDrawPipeline(Handle<SHVkRenderpass> renderPass, Handle<SHSubpass> subpass, bool filled, bool triMesh, bool instanced) Handle<SHVkPipeline> SHGraphicsSystem::createDebugDrawPipeline(Handle<SHVkRenderpass> renderPass, Handle<SHSubpass> subpass, bool filled, bool triMesh, bool instanced)
{ {
auto pipelineLayout = resourceManager.Create<SHVkPipelineLayout> auto pipelineLayout = resourceManager.Create<SHVkPipelineLayout>

View File

@ -399,7 +399,7 @@ namespace SHADE
uint32_t GetCurrentFrameIndex(void) const noexcept { return renderContext.GetCurrentFrame(); } uint32_t GetCurrentFrameIndex(void) const noexcept { return renderContext.GetCurrentFrame(); }
SHFontLibrary const& GetFontLibrary (void) const noexcept; SHFontLibrary const& GetFontLibrary (void) const noexcept;
const SHMeshLibrary& GetMeshLibrary() const noexcept { return meshLibrary; }; const SHMeshLibrary& GetMeshLibrary() const noexcept { return meshLibrary; };
std::unordered_map<std::string, Handle<SHSubpass>> const& GetUsableSubpasses(void) const noexcept {return usableSubpassesMapping;}; Handle <SHSubpass> const& GetUsableSubpass(std::string subpassName) const noexcept;
/*-----------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------*/
/* Getters */ /* Getters */