Added API method for (re)setting texture search paths.

Was only possible on startup before, changing the paths required recreating the whole projectM instance. Now, the method will only reset the texture manager, but not the shaders and presets.
This commit is contained in:
Kai Blaschke
2022-12-30 16:07:50 +01:00
parent 22b0ccc423
commit bbfc4f7170
7 changed files with 63 additions and 22 deletions

View File

@ -108,6 +108,12 @@ auto ProjectM::InitRenderToTexture() -> unsigned
return m_renderer->initRenderToTexture();
}
void ProjectM::SetTexturePaths(std::vector<std::string> texturePaths)
{
m_textureSearchPaths = std::move(texturePaths);
m_renderer->SetTextureSearchPaths(m_textureSearchPaths);
}
void ProjectM::ResetTextures()
{
m_renderer->ResetTextures();