dungeon_crawler

diff prototype/src/renderer_deferred.h @ 60:aa86119e3295

added multipass deferred
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Sep 2012 06:19:37 +0300
parents acfe0c0110fc
children fc2b3d06d07c
line diff
     1.1 --- a/prototype/src/renderer_deferred.h	Fri Sep 21 05:28:45 2012 +0300
     1.2 +++ b/prototype/src/renderer_deferred.h	Tue Sep 25 06:19:37 2012 +0300
     1.3 @@ -6,7 +6,7 @@
     1.4  #define MRT_COUNT	3
     1.5  
     1.6  class DeferredRenderer : public Renderer {
     1.7 -private:
     1.8 +protected:
     1.9  	unsigned int fbo, rbuf_depth;
    1.10  	unsigned int mrt_tex[MRT_COUNT];
    1.11  	int tex_xsz, tex_ysz;
    1.12 @@ -16,20 +16,24 @@
    1.13  
    1.14  	mutable unsigned int curr_prog;
    1.15  
    1.16 -	bool create_fbo();
    1.17 +	int num_draw_bufs;
    1.18 +
    1.19 +	virtual bool create_fbo();
    1.20  
    1.21  public:
    1.22  	DeferredRenderer();
    1.23 -	~DeferredRenderer();
    1.24 +	virtual ~DeferredRenderer();
    1.25  
    1.26 -	bool init(int xsz, int ysz);
    1.27 +	virtual bool init(int xsz, int ysz);
    1.28  
    1.29 -	int get_tangent_location() const;
    1.30 -	unsigned int get_current_program() const;
    1.31 +	virtual int get_tangent_location() const;
    1.32 +	virtual unsigned int get_current_program() const;
    1.33  
    1.34 -	void resize(int xsz, int ysz);
    1.35 +	virtual void resize(int xsz, int ysz);
    1.36  
    1.37 -	void render(const Level *level) const;
    1.38 +	virtual void render(const Level *level) const;
    1.39 +
    1.40 +	virtual void light_pass(const Level *level) const;
    1.41  };
    1.42  
    1.43  #endif	// RENDERER_DEFERRED_H_