33 #include <unordered_map>
36 #include "opengl3.hpp"
37 #include "noncopyable.hpp"
60 typedef std::shared_ptr < shader > sharedptr;
69 explicit shader(GLenum
const p_type);
216 typedef std::unordered_map < std::string, GLint > locations_type;
217 typedef std::unordered_map < std::string, GLuint > indices_type;
218 typedef std::set < shader::sharedptr > glsl_shader_set_type;
221 glsl_shader_set_type m_attached_shaders;
222 mutable locations_type m_attribute_locations, m_uniform_locations;
223 mutable indices_type m_uniform_block_indices;
228 void bind_uniform_block_to_location(program &p_prog, GLuint
const p_block_index, GLuint
const p_location);
238 typedef std::function < void(std::string const &p_errormsg) > errormsg_callback;
241 class build_program_impl
244 explicit build_program_impl(program &p_prog, errormsg_callback
const &p_errormsg_callback);
245 build_program_impl& operator()(GLenum
const p_type, std::string
const &p_identifier, std::string
const &p_code);
246 build_program_impl& operator()(shader::sharedptr
const &p_shaderptr);
250 errormsg_callback m_errormsg_callback;
276 detail::build_program_impl build_program(program &p_prog, detail::errormsg_callback
const &p_errormsg_callback = detail::errormsg_callback());