dungeon_crawler

view prototype/src/renderer.h @ 50:c40efa9cf844

torches sound
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Sep 2012 04:45:46 +0300
parents 862461b686f4
children f71381c9e245
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(const Level *level) const = 0;
22 };
25 class FwdRenderer : public Renderer {
26 protected:
27 unsigned int sdrprog;
28 int tang_attr;
30 public:
31 FwdRenderer();
32 ~FwdRenderer();
34 bool init(int xsz, int ysz);
36 int get_tangent_location() const;
37 unsigned int get_current_program() const;
39 void render(const Level *level) const;
40 };
43 extern Renderer *rend;
46 #endif // RENDERER_H_