Definition at line 56 of file shader.cpp.
Public Member Functions | |
void | compile () |
int | get_id () |
void | read_file (const string &fname) |
shader_base (const string &fname) | |
void | unload () |
virtual | ~shader_base () |
Protected Member Functions | |
virtual void | create ()=0 |
Protected Attributes | |
const string | fname |
list< string > | lines |
int | opengl_id |
shader_base | ( | const string & | fname | ) |
~shader_base | ( | ) | [virtual] |
void compile | ( | ) |
Definition at line 144 of file shader.cpp.
References simple_array::append(), CHECK_GL_ERRORS, shader_base::create(), shader_base::fname, shader_base::lines, shader_base::opengl_id, simple_array::ptr(), simple_array::size(), and string::w_string().
virtual void create | ( | ) | [protected, pure virtual] |
int get_id | ( | ) | [inline] |
void read_file | ( | const string & | fname | ) |
Definition at line 122 of file shader.cpp.
References ft_stream::at_end(), and shader_base::lines.
Referenced by shader_base::shader_base().
void unload | ( | ) |
Definition at line 134 of file shader.cpp.
References CHECK_GL_ERRORS, and shader_base::opengl_id.
Referenced by shader_base::~shader_base().
Definition at line 59 of file shader.cpp.
Referenced by shader_base::compile(), fragment_shader::create(), and vertex_shader::create().
Definition at line 61 of file shader.cpp.
Referenced by shader_base::compile(), and shader_base::read_file().
int opengl_id [protected] |
Definition at line 60 of file shader.cpp.
Referenced by shader_base::compile(), fragment_shader::create(), vertex_shader::create(), shader_base::get_id(), and shader_base::unload().