Ejemplo n.º 1
0
        } // Clear

        /// <summary>
        /// Clear render target.
        /// This is the same as calling Clear from the first render target.
        /// </summary>
        public static void ClearCurrentRenderTargets(Color clearColor)
        {            
            if (currentRenderTarget == null)
                throw new InvalidOperationException("Render Target: You can't clear a render target without first setting it");
            currentRenderTarget.Clear(clearColor);
        } // Clear
        } // SetViewport

        #endregion

        #region Set Face

        /// <summary>
        /// Set face for cube shadows.
        /// </summary>
        internal void SetFace(CubeMapFace cubeMapFace)
        {
            // Enable first render target.
            lightDepthTextureCube.EnableRenderTarget(cubeMapFace);
            lightDepthTextureCube.Clear(Color.White);
        } // SetViewport