atm we are going to have 1 renderer per scene and 1 shader program
for the scene
*/
+
+
class Camera;
+class Object;
class Scene;
class ShaderProgram;
-class Object;
class Renderer {
protected:
Renderer(ShaderProgram *sprog, Scene *scene, Camera *camera);
virtual ~Renderer();
- /* for the moment each Renderer creates and destroys the ShaderProgram
- because we are using only a couple of shaders, in the future we might need a shader
- manager that stores the shaders and replace these functions with something like:
- void set_shader_program(ShaderProgram *sprog) */
- virtual bool init_shaders(const char *vfname, const char *ffname) = 0;
- virtual void destroy_shaders() = 0;
+ virtual bool load_shader_program(const char *vfname, const char *ffname) = 0;
+ virtual void use_shader_program() = 0;
+ virtual bool create() = 0;
virtual void draw() const = 0;
};