Example #1
0
static void load_shader_from_file(uint32 shader, const std::string& path) {
	load_shader_from_source(shader, read_file(path));
}
void GLSL_Program::attach_fragment_shader_from_source(std::string source) {
	attach_shader(load_shader_from_source(source, GL_FRAGMENT_SHADER));
}
void GLSL_Program::attach_vertex_shader_from_source(std::string source) {
	attach_shader(load_shader_from_source(source, GL_VERTEX_SHADER));
}
void GLSL_Program::attach_shader_from_source(std::string source, GLenum type) {
	attach_shader(load_shader_from_source(source, type));
}