#ifndef __CountedRenderingCallBack__
#define __CountedRenderingCallBack__
/****************************************************************************************

		CountedRenderingCallback.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Charles
		Date:	05/05/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		05/05/99	charles		Created
*****************************************************************************************/

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCBasicTypes.h"
#include "I3DRenderingModule.h"
#include "MCSMPCountedObject.h"
#include "I3DRenderHelper.h"

/// see I3DRenderingCallbacks for more info.
///
class TCountedRenderingCallbacks : public I3DRenderingCallbacks, public TMCSMPCountedObject
{
public:
	virtual MCCOMErr MCCOMAPI QueryInterface(const MCIID &riid, void** ppvObj);
	virtual uint32	 MCCOMAPI AddRef()  { return TMCSMPCountedObject::AddRef(); }
	virtual uint32   MCCOMAPI Release() { return TMCSMPCountedObject::Release(); }

	// I3DRenderCallbacks
	virtual MCCOMErr MCCOMAPI UpdateProgress(real progress, real progressMax);
	virtual MCCOMErr MCCOMAPI RectCompleted(const TMCRect & rect);
	virtual MCCOMErr MCCOMAPI BeginAnimation();
	virtual MCCOMErr MCCOMAPI EndAnimation();
	virtual MCCOMErr MCCOMAPI BeginFrame(uint32 frameNumber);
	virtual MCCOMErr MCCOMAPI EndFrame(uint32 frameNumber);
	virtual MCCOMErr MCCOMAPI BeginRendering();
	virtual MCCOMErr MCCOMAPI EndRendering();
	virtual void	 MCCOMAPI SetRenderHelper(I3DRenderHelper* renderHelper);

protected:
	TMCCountedPtr<I3DRenderHelper>		fRenderHelper;
};

#endif

