/// <summary>
/// Internal method for adding a solid renderable ot the group based on lighting stage.
/// </summary>
/// <param name="technique">Technique to use for this renderable.</param>
/// <param name="renderable">Renderable to add to the queue.</param>
protected void AddSolidRenderableSplitByLightType(Technique technique, IRenderable renderable)
{
// Divide the passes into the 3 categories
for (var i = 0; i < technique.IlluminationPassCount; i++)
{
// Insert into solid list
var illpass = technique.GetIlluminationPass(i);
SortedList passMap = null;
switch (illpass.Stage)
{
case IlluminationStage.Ambient:
passMap = this.solidPasses;
break;
case IlluminationStage.PerLight:
passMap = this.solidPassesDiffuseSpecular;
break;
case IlluminationStage.Decal:
passMap = this.solidPassesDecal;
break;
}
var solidList = (RenderableList)passMap[illpass.Pass];
if (solidList == null)
{
// add a new list to hold renderables for this pass
solidList = new RenderableList();
passMap.Add(illpass.Pass, solidList);
}
solidList.Add(renderable);
}
}