bool MaterialHandle::PrepareDisplay(
	const MaxSDK::Graphics::UpdateDisplayContext& prepareDisplayContext)
{
	using namespace MaxSDK::Graphics;
	IMeshDisplay2* pMeshDisplay = 
		static_cast<IMeshDisplay2*>(mesh.GetInterface(IMesh_DISPLAY2_INTERFACE_ID));
	if (NULL == pMeshDisplay)
	{
		return false;
	}	
	GenerateMeshRenderItemsContext generateRenderItemsContext;
	generateRenderItemsContext.GenerateDefaultMeshElementDescriptions(
		prepareDisplayContext.GetRequiredComponents());
	
	if(!mSolidColorMaterialHandle.IsValid())
	{
		mSolidColorMaterialHandle.Initialize();
		mSolidColorMaterialHandle.SetColor(AColor(1.0f,0.2f,0.2f,1.0f));
	}
	
	generateRenderItemsContext.AddRequiredStreams(*mSolidColorMaterialHandle.GetRequiredStreams());
	pMeshDisplay->PrepareDisplay(generateRenderItemsContext);
	return true;
}