#ifndef INCLUDED_RENDERER_OUTLINEDOLIDOBJECTRENDERER
#define INCLUDED_RENDERER_OUTLINEDOLIDOBJECTRENDERER

#include "ObjectRenderer.h"

#include <map>

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

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

/// @brief Renders objects with an outline
///
/// This renderer will show the objects with a thick black outline
/// around the edges.  It works well when you're trying to create
/// a cel shaded look, though these days I don't bother with the full
/// cel shading.
class OutlinedObjectRenderer
	: public ObjectRenderer
{
public:
	OutlinedObjectRenderer();
	~OutlinedObjectRenderer();
	virtual void        RenderObject( VisibleObjectPtr pObject );
	virtual void 		ResetGL();
protected:
private:
	typedef std::pair<VBOData,VBOData> VBODataPair;
	typedef std::map<VisibleObjectPtr,VBODataPair> ObjectDataMap;
	ObjectDataMap       m_ObjectDataMap;

	VBOData 			BindOutlineToVBO( VisibleObjectPtr pObject );
};

}
}

#endif
