/****************************************************************************************

	Sand.h

	Copyright (c)1990 - 1999 MetaCreations. All rights reserved.

	Author:	Jonathan Trachtenberg

	Date:	06/04/99

	Revision History

	when		who			what & why
	=========== ===========	=============================================================

****************************************************************************************/

#ifndef __SAND__
#define __SAND__  

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include	"BasicPostRenderer.h"
#include	"SandDef.h"
#include	"IShRasterLayer.h"


// Define the Sand CLSID ( see the SandDef.h file to get the R_CLSID_SAND value )

extern const MCGUID CLSID_Sand;

// Data storage of our extension :
struct SandData
{//No user input
};
 
// Sand Object :

class Sand : public TBasicPostRenderer
{
public :  
  Sand();

	// IUnknown methods
	STANDARD_RELEASE;

	// IExDataExchanger methods :
	virtual void*	 MCCOMAPI GetExtensionDataBuffer	();
	virtual int32	 MCCOMAPI GetParamsBufferSize		() const	{ return sizeof(fData);}
  
	// I3DExPostRenderer methods
	void			 MCCOMAPI GetBufferNeeds			(RenderFilterNeeds& needs, void* renderer);

	virtual	MCCOMErr MCCOMAPI PrepareDraw				(IShRasterLayer* input,
														 const TMCRect& bounds,
														 IShChannel* buffers[],
														 I3DShScene* scene,
														 I3DShCamera* renderingCamera,
														 const TBBox2D&	uvBox,
														 const TBBox2D& productionFrame);

	virtual	MCCOMErr MCCOMAPI DrawRect					(const TMCRect& outputRect,
														 const TChannelDataBucket* outputTile[],
														 const TChannelDataBucket* compositedOutputTile[],
														 const TBBox2D &uvBox);
	
	virtual	MCCOMErr MCCOMAPI FinishDraw				();

protected :
	
	TMCCountedPtr<IShRasterLayer>	fColorOffscreen;
    SandData						fData;

};

#endif
