void render()
{
	fr.SetCameraPos(Camera.getPos());
	glm::mat4 view = Camera.getView();
	glm::mat4 projection = Camera.getProjection();
    glClearColor( 0.f, 0.f, 0.0f, 0.f );
	glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

	fr.render(view, projection);
	
    glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	pr.render(view,projection);
	pr2.render(view,projection);
	pr3.render(view,projection);
	glDisable(GL_BLEND);

	GBuffer::BindForWriting();
	glDepthMask(GL_TRUE);
	glEnable(GL_DEPTH_TEST);
	glDepthFunc(GL_LESS);

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glClearColor( 0.f, 0.f, 0.0f, 0.f );

	

    Plane.render(view,projection);
    
	glDisable(GL_DEPTH_TEST);

	GBuffer::DefaultBuffer();

	return;
}
void render()
{
	fr.SetCameraPos(Camera.getPos());
	glm::mat4 view = Camera.getView();
	glm::mat4 projection = Camera.getProjection();
	glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
	glClearColor( 0.f, 0.f, 0.5f, 0.f );
	fr.render(view, projection);

	GBuffer::BindForWriting();

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glDepthMask(GL_TRUE);
	glEnable(GL_DEPTH_TEST);
	glDepthFunc(GL_LESS);
	glEnable(GL_CULL_FACE);
	glCullFace(GL_FRONT);
	glClearColor( 0.f, 0.f, 0.5f, 0.f );
	Terrain.render(view, projection);
	GBuffer::DefaultBuffer();
	//glDisable(GL_CULL_FACE);
	//glDisable(GL_DEPTH_TEST);
	return;
}