Skip to content

Commit

Permalink
Fail if there are no passes in gl3 rendercfg.
Browse files Browse the repository at this point in the history
  • Loading branch information
logzero committed Nov 29, 2023
1 parent 921f774 commit 2b39758
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/graphics/graphics_gl3v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,13 @@ bool GraphicsGL3::ReloadShaders(std::ostream & info_output, std::ostream & error
bool passInfosLoaded = joeserialize::LoadObjectFromFile("passList", shaderpath+"/"+rendercfg, passInfos, false, true, info_output, error_output);
if (passInfosLoaded)
{
// sanity check
if (passInfos.empty())
{
error_output << "No passes defined in: " << shaderpath+"/"+rendercfg << std::endl;
return false;
}

// strip pass infos from the list that we pass to the renderer if they are disabled
for (int i = passInfos.size() - 1; i >= 0; i--)
{
Expand Down

0 comments on commit 2b39758

Please sign in to comment.