private void ClearShadow(int lightIndex)
        {
            if (
                (RenderStack.Graphics.Configuration.canUseTextureArrays == false) &&
                (lightIndex > 0)
                )
            {
                return;
            }

            IFramebuffer framebuffer = shadow;

            renderer.Requested.Viewport = framebuffer.Viewport;

            var shadowAttachment = example.Renderer.Configuration.hardwareShadowPCF
                ? FramebufferAttachment.DepthAttachment
                : FramebufferAttachment.ColorAttachment0;

            framebuffer.Begin();
            if (
                (RenderStack.Graphics.Configuration.canUseTextureArrays) &&
                (RenderStack.Graphics.Configuration.glslVersion >= 330)
                )
            {
                framebuffer.AttachTextureLayer(shadowAttachment, 0, lightIndex);
            }

            GL.Viewport(
                renderer.Requested.Viewport.X,
                renderer.Requested.Viewport.Y,
                renderer.Requested.Viewport.Width,
                renderer.Requested.Viewport.Height
                );

            renderer.PartialGLStateResetToDefaults();

            GL.Disable(EnableCap.ScissorTest);
            GL.ClearColor(1.0f, 1.0f, 1.0f, 1.0f);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
        }