#ifndef UIRENDER_H
#define UIRENDER_H

#include "./../../lib/GLee/GLee.h"	
 #include <QGLContext>
#include "./renderer/Render.h"
#include "./shadow/LightShadow.h"
#include "./Golem/tricol.h"
#include "./dtit/lightDTIT.h"
#include <iterator>

/**
*	Trida renderujici objekty, pouziva Phonguv svetelny model a Shadow mapping
*	Pozor tride musi byt predany shadery kompatibilni s jejim rozhranim.
*	Doporucene shadery: GLphongLightingVs vertex shader a GLphongLightingFs fragment shader obsazene v golemCompatiblePhong.txt
*/
class UiRender: public Render
{
protected:
	ShaderComposer vertexShader;
	ShaderComposer fragmentShader;
	float cameraPos[3];


public:
	UiRender( Context &context, CGprogram vertexShader, CGprogram fragmentShader   );  /**<  context = informace kam renderovat, vertexShader a fragmentShader = se tridou kompatibilni shadery, shadowTextur =ID textury urcene pro shadow mapping, shadowTextureRes = velikost teto textury */

	void renderModels( vector<DTITLight*> &lights, vector<Model*> &models, float scale = 1.0, float gamma=1.0  );
	void renderLights( vector<DTITLight*> &lights, const vector< CTriCol*>& lightColors );
	void renderLights( vector<DTITLight*> &lights, const CTriCol* color=NULL );
	void beginFrame(const Camera<float>& camera);
};

#endif