2020-05-20 12:11:22 +00:00
|
|
|
#ifndef slic3r_GLShadersManager_hpp_
|
|
|
|
#define slic3r_GLShadersManager_hpp_
|
|
|
|
|
|
|
|
#include "GLShader.hpp"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
class GLShadersManager
|
|
|
|
{
|
|
|
|
std::vector<std::unique_ptr<GLShaderProgram>> m_shaders;
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::pair<bool, std::string> init();
|
|
|
|
// call this method before to release the OpenGL context
|
|
|
|
void shutdown();
|
|
|
|
|
|
|
|
// returns nullptr if not found
|
|
|
|
GLShaderProgram* get_shader(const std::string& shader_name);
|
2020-05-21 08:15:00 +00:00
|
|
|
|
|
|
|
// returns currently active shader, nullptr if none
|
|
|
|
GLShaderProgram* get_current_shader();
|
2020-05-20 12:11:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Slic3r
|
|
|
|
|
|
|
|
#endif // slic3r_GLShadersManager_hpp_
|