mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-07 09:45:40 +00:00
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:
@ -176,6 +176,22 @@ void projectm_reset_gl(projectm_handle instance, int width, int height)
|
||||
projectMInstance->ResetOpenGL(width, height);
|
||||
}
|
||||
|
||||
void projectm_set_texture_search_paths(projectm_handle instance,
|
||||
const char** texture_search_paths,
|
||||
size_t count)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
|
||||
std::vector<std::string> texturePaths;
|
||||
|
||||
for (size_t index = 0; index < count; index++)
|
||||
{
|
||||
texturePaths.emplace_back(texture_search_paths[index]);
|
||||
}
|
||||
|
||||
projectMInstance->SetTexturePaths(texturePaths);
|
||||
}
|
||||
|
||||
void projectm_reset_textures(projectm_handle instance)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
|
||||
Reference in New Issue
Block a user