public GetIlluminationPass ( int index ) : |
||
index | int | Index of the IlluminationPass to retreive. |
return |
/// <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); } }
/// <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 (int i = 0; i < technique.IlluminationPassCount; i++) { // Insert into solid list IlluminationPass illpass = technique.GetIlluminationPass(i); SortedList passMap = null; switch(illpass.Stage) { case IlluminationStage.Ambient: passMap = solidPasses; break; case IlluminationStage.PerLight: passMap = solidPassesDiffuseSpecular; break; case IlluminationStage.Decal: passMap = solidPassesDecal; break; } RenderableList 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); } }