dungeon_crawler

view prototype/src/renderer.h @ 63:7f52d6310317

fixed design issue with datafile_path
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 02 Oct 2012 04:52:59 +0300
parents acfe0c0110fc
children a27528035e20
line source
1 #ifndef RENDERER_H_
2 #define RENDERER_H_
4 class Level;
6 class Renderer {
7 protected:
8 int width, height;
10 public:
11 Renderer();
12 virtual ~Renderer();
14 virtual bool init(int xsz, int ysz);
16 virtual int get_tangent_location() const;
17 virtual unsigned int get_current_program() const;
19 virtual void resize(int xsz, int ysz);
21 virtual void render_pre(const Level *level) const;
22 virtual void render(const Level *level) const = 0;
23 virtual void render_post(const Level *level) const;
24 };
27 class FwdRenderer : public Renderer {
28 protected:
29 unsigned int sdrprog;
30 int tang_attr;
32 public:
33 FwdRenderer();
34 ~FwdRenderer();
36 bool init(int xsz, int ysz);
38 int get_tangent_location() const;
39 unsigned int get_current_program() const;
41 void render(const Level *level) const;
42 };
45 extern Renderer *rend;
48 #endif // RENDERER_H_