Exemplo n.º 1
0
        void AddCompositors()
        {
            // HDR
            CompositorInstance instance = CompositorManager.Singleton.AddCompositor(viewport, "HDR", 0);

            CompositorManager.Singleton.SetCompositorEnabled(viewport, "HDR", false);
            HDRListener hdrListener = new HDRListener();

            hdrListener.NotifyViewportSize(viewport.ActualWidth, viewport.ActualHeight);
            hdrListener.NotifyCompositor(instance);

            // Glass
            instance = CompositorManager.Singleton.AddCompositor(viewport, "Glass");
            CompositorManager.Singleton.SetCompositorEnabled(viewport, "Glass", false);

            togglers = new CompositorToggler[]
            {
                new CompositorToggler("HDR", MOIS.KeyCode.KC_1, viewport),
                new CompositorToggler("Glass", MOIS.KeyCode.KC_2, viewport)
            };

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (CompositorToggler toggler in togglers)
            {
                sb.Append(toggler.keyCode.ToString().Substring(3));
                sb.Append('-');
                sb.Append(toggler.compositorName);
                sb.Append(", ");
            }
            sb.Length -= 2;

            mDebugText = sb.ToString();
        }
Exemplo n.º 2
0
        void AddCompositors()
        {
            // HDR
            CompositorInstance instance = CompositorManager.Singleton.AddCompositor(viewport, "HDR", 0);
            CompositorManager.Singleton.SetCompositorEnabled(viewport, "HDR", false);
            HDRListener hdrListener = new HDRListener();
            hdrListener.NotifyViewportSize(viewport.ActualWidth, viewport.ActualHeight);
            hdrListener.NotifyCompositor(instance);

            // Glass
            instance = CompositorManager.Singleton.AddCompositor(viewport, "Glass");
            CompositorManager.Singleton.SetCompositorEnabled(viewport, "Glass", false);

            togglers = new CompositorToggler[]
                {
                    new CompositorToggler("HDR",    MOIS.KeyCode.KC_1, viewport),
                    new CompositorToggler("Glass",  MOIS.KeyCode.KC_2, viewport)
                };

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (CompositorToggler toggler in togglers)
            {
                sb.Append(toggler.keyCode.ToString().Substring(3));
                sb.Append('-');
                sb.Append(toggler.compositorName);
                sb.Append(", ");
            }
            sb.Length -= 2;

            mDebugText = sb.ToString();
        }