/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
***************************************************************************/

#pragma once

#include "glmMemory.h"

#include "glmApexRenderResourceManager.h"
#include <glmApex.h>	//needed for inheritance to NxUserRenderer
#include "glmClothVertex.h"

namespace glm
{
	//-----------------------------------------------------------------------------
	class ApexClothRenderer : public nvidia::apex::UserRenderer
	{
	public:
		GLM_CLASS_STAT_ID( glm::MemoryStatIds::Simulation)

		ApexClothRenderer();
		virtual	~ApexClothRenderer();

		void renderResource(const nvidia::apex::RenderContext& context);

		glm::PODArray<ClothVertex>* _clothVerticesForRendering;	// one for each triangle vertex
		glm::PODArray<uint32_t>* _clothIndicesForRendering;		// one for each triangle vertex, matches _clothVerticesForRendering indices
	};
}
