#ifndef INCLUDED_RENDERER_SIMPLE_RENDERER
#define INCLUDED_RENDERER_SIMPLE_RENDERER

#include "ObjectRenderer.h"

#include <map>

//////////////////////////////////////////////////////////////
namespace Dubious {
namespace Renderer {

class OpenGLContextStore;
class VisibleObject;
class Model;
typedef std::shared_ptr<VisibleObject> VisibleObjectPtr;
typedef std::shared_ptr<Model> ModelPtr;

/// @brief Basic object renderer.
///
/// The SimpleObjectRenderer is a very basic renderer that
///	just draws objects as a collection of flat surfaces.  No
///	fancy effects are used.
class SimpleObjectRenderer
	: public ObjectRenderer
{
public:
	/// @brief Constructor
	SimpleObjectRenderer();

	/// @brief Destructor
	~SimpleObjectRenderer();

	/// @brief RenderObject is called to actually render the object.
	///
	///	It will render it as a collection of flat surfaces
	/// @param pObject - [in] the object to render
	virtual void        RenderObject( VisibleObjectPtr pObject );

	virtual void 		ResetGL();

private:

	typedef std::map<VisibleObjectPtr,VBOData> ObjectDataMap;
	ObjectDataMap       m_ObjectDataMap;
};

}
}

#endif
