#ifndef RENDER2D_H
#define RENDER2D_H

#include "./../../lib/GLee/GLee.h"	

#include "./openGlSupport/OpenGLwrapper.h"
#include "./Context/Context.h"
#include "./renderer/AbstractRender.h"
#include <Cg/Cg.h>
#include <Cg/cgGL.h>
#include "./macros/macro.h"

class FBO;


///	Basic Billboarding class, render is done in simplest shader
class Render2D : public AbstractRender
{
private:
	CGprogram vShader;
	CGprogram fShader;

public:
	Render2D( Context & context, CGprogram &vShader, CGprogram &fShader);
	virtual void beginFrame(void);

	virtual void bind(void);

	void renderWholeViewportTexture(unsigned int textureID);
	void renderTexture(unsigned int textureID, float leftDownCornerPos[2], float rightDownCornerPos[2], float rightUpCornerPos[2], float leftUpCornerPos[2]);
	void renderTexture(unsigned int textureID, float leftUpCornerPos[2], float size[2]);
	void renderFBO( const FBO* fbo );
	void renderTexture(GLuint id_tex);
};

#endif