21 glUseProgram(_program);
31 GLint get_attrib_location(
const std::string &name)
const
33 return glGetAttribLocation(_program, name.c_str());
37 GLint get_uniform_location(
const std::string &name)
const
39 return glGetUniformLocation(_program, name.c_str());
43 void bind_frag_data_location(
const std::string &name)
47 glBindFragDataLocation(_program, 0, name.c_str() );
53 void bind_frag_data_location(
const std::string &name,
const std::string &name2)
57 glBindFragDataLocation(_program, 0, name.c_str() );
58 glBindFragDataLocation(_program, 1, name2.c_str() );
72 std::string shadername;
78 GLuint _vertex_shader;
79 GLuint _geometry_shader;
80 GLuint _fragment_shader;
83 GLuint compile(GLenum type,
const string &source);
86 void shader_log(GLuint shader);
87 void program_log(GLuint program);
92 #endif //#ifndef _SHADER_HPP_