Nez.Portable/ECS/Scene.cs
/// <summary>
/// adds a Renderer to the scene
/// </summary>
/// <returns>The renderer.</returns>
/// <param name="renderer">Renderer.</param>
adds a Renderer to the scene
adds a Renderer to the scene
public T AddRenderer<T>(T renderer)
            where T : Renderer
        {
            if (renderer.wantsToRenderAfterPostProcessors)
            {
                _afterPostProcessorRenderers.add(renderer);
                _afterPostProcessorRenderers.sort();
            }
            else
            {
                _renderers.add(renderer);
                _renderers.sort();
            }
            if (_didSceneBegin)
                renderer.onSceneBackBufferSizeChanged(_sceneRenderTarget.Width, _sceneRenderTarget.Height);
            return renderer;
        }
public T AddRenderer < T > ( T renderer ) where T : Renderer { if ( renderer . wantsToRenderAfterPostProcessors ) { _afterPostProcessorRenderers . add ( renderer ) ; _afterPostProcessorRenderers . sort ( ) ; } else { _renderers . add ( renderer ) ; _renderers . sort ( ) ; } if ( _didSceneBegin ) renderer . onSceneBackBufferSizeChanged ( _sceneRenderTarget . Width , _sceneRenderTarget . Height ) ; return renderer ; }
adds a Renderer to the scene
adds a Renderer to the scene
// if we already began let the PostProcessor know what size our RenderTarget is
None
renderer
T
None