35 typedef std::shared_ptr<ShaderProgram>
Ptr;
36 typedef std::shared_ptr<ShaderProgram const>
ConstPtr;
40 static Ptr create (
void);
46 bool try_load_all (std::string
const& basename);
49 void load_vert_file (std::string
const& filename);
51 void load_geom_file (std::string
const& filename);
53 void load_frag_file (std::string
const& filename);
56 void load_vert_code (std::string
const& code);
58 void load_geom_code (std::string
const& code);
60 void load_frag_code (std::string
const& code);
63 void unload_vert (
void);
65 void unload_geom (
void);
67 void unload_frag (
void);
74 GLint get_attrib_location (
char const* name);
81 GLint get_uniform_location (
char const* name);
84 void send_uniform (
char const* name,
math::Vec3f const& v);
86 void send_uniform (
char const* name,
math::Vec4f const& v);
90 void send_uniform (
char const* name, GLint val);
92 void send_uniform (
char const* name, GLfloat val);
98 void unbind (
void)
const;
103 void load_shader_file (GLuint& shader_id, GLuint shader_type,
104 std::string
const& filename);
105 void load_shader_code (GLuint& shader_id, GLuint shader_type,
106 std::string
const& code);
107 void unload_shader (GLuint& shader_id);
108 void compile_shader (GLuint shader_id, std::string
const& code);
110 GLint get_program_property (
int pname);
111 GLint get_shader_property (GLuint shader_id,
int pname);
113 void ensure_linked (
void);