예제 #1
0
        public void DefineOutput(ResourceInfo resourceInfo, bool isLeftSet = true)
        {
            var resource = new Resource()
            {
                Name = resourceInfo.Name,
                Finaliser = Resource.DefaultFinaliser,
                IsLeftSet = isLeftSet,
                Format = resourceInfo.Format
            };

            outputs.Add(resource);
        }
예제 #2
0
        /// <summary>
        /// Informs the renderer of a resource this component is generating.
        /// </summary>
        /// <param name="name">The name of the resource.</param>
        /// <param name="isLeftSet"><c>true</c> if this component will leave the render target set on the device; else <c>false</c>.</param>
        /// <param name="finaliser">A cleanup method, called when the resource is no longer needed. <c>null</c> for the default finaliser.</param>
        /// <param name="format">The format of the render target.</param>
        public void DefineOutput(
            string name,
            bool isLeftSet,
            Action<Renderer, RenderTarget2D> finaliser,
            RenderTargetInfo format)
        {
            var resource = new Resource()
            {
                Name = name,
                Finaliser = finaliser ?? Resource.DefaultFinaliser,
                IsLeftSet = isLeftSet,
                Format = format
            };

            outputs.Add(resource);
        }