public void Draw(
Matrix eyeView, Matrix eyeProjection,
Matrix lightView, Matrix lightProjection,
DrawShadowCastersCallback drawShadowCasters)
{
if (drawShadowCasters == null) throw new ArgumentNullException("drawShadowCasters");
PrepareRenderTarget();
GraphicsDevice.DepthStencilState = DepthStencilState.Default;
GraphicsDevice.BlendState = BlendState.Opaque;
// エフェクトを設定。
shadowMapEffect.View = lightView;
shadowMapEffect.Projection = lightProjection;
GraphicsDevice.SetRenderTarget(RenderTarget);
GraphicsDevice.Clear(Color.White);
// 描画をコールバック。
// 描画する投影オブジェクトの選別は、コールバックされる側のクラスで決定。
drawShadowCasters(eyeView, eyeProjection, shadowMapEffect);
GraphicsDevice.SetRenderTarget(null);
}