27#ifndef EASY3D_RENDERER_SHADER_MANAGER_H
28#define EASY3D_RENDERER_SHADER_MANAGER_H
31#include <unordered_map>
33#include <easy3d/renderer/shader_program.h>
50 static ShaderProgram* get_program(
const std::string& shader_name);
54 const std::string& file_base_name,
55 const std::vector<ShaderProgram::Attribute>& attributes = std::vector<ShaderProgram::Attribute>(),
56 const std::vector<std::string>& outputs = std::vector<std::string>(),
57 bool geom_shader =
false
63 const std::string& vert_file_name,
64 const std::string& frag_file_name,
65 const std::string& geom_file_name =
"",
66 const std::string& extra_vert_code =
"",
67 const std::string& extra_frag_code =
"",
68 const std::string& extra_geom_code =
"",
69 const std::vector<ShaderProgram::Attribute>& attributes = std::vector<ShaderProgram::Attribute>(),
70 const std::vector<std::string>& outputs = std::vector<std::string>()
75 const std::string& vert_code,
76 const std::string& frag_code,
77 const std::string& geom_code =
"",
78 const std::vector<ShaderProgram::Attribute>& attributes = std::vector<ShaderProgram::Attribute>(),
79 const std::vector<std::string>& outputs = std::vector<std::string>()
82 static std::vector<ShaderProgram*> all_programs();
85 static void terminate();
92 static std::unordered_map<std::string, ShaderProgram*> programs_;
93 static std::unordered_map<std::string, bool> attempt_load_program_;
Management of shader programs.
Definition: shader_manager.h:46
OpenGL Shader Compilation.
Definition: shader_program.h:78
Definition: collider.cpp:182