#ifndef GBUFFER_H
#define GBUFFER_H

#include <windows.h>
#undef __glext_h_
#undef __glxext_h_
#undef __gl_h_
#include <GL/GLee.h>
#include <vector>
#include "Camera.h"
#include "View.h"
#include "Level.h"
using namespace std;

class GBuffer 
{
private:
	GLuint m_nColorTex;
	GLuint m_nDepthTex;
	GLuint m_nNormalTex;
	GLuint m_nFrameBuffer;

	int m_nWidth, m_nHeight;

public:
	GBuffer(int nWidth, int nHeight);
	~GBuffer();

	void drawToBuffer(View *view, Camera *camera, Level *level);

	void bind();
	void unbind();

	void bindDepthTex();
	void bindNormalTex();
	void bindColorTex();

	GLuint getNormalTex();
	GLuint getDepthTex();
	GLuint getColorTex();

	int getWidth();
	int getHeight();
};

#endif