Ejemplo n.º 1
0
        public static Overlay CreateOverlay(IServiceRegistry services, DirectXViewer application)
        {
            Overlay overlay = new Overlay(services)
            {
                Width = 576, Height = 576
            };

            overlay.BeginDesign();

            Button bCaptureFrame = new Button()
            {
                Width = 64, Height = 64, Content = new TextBlock {
                    Text = "D"
                }
            };
            Button bSwitchToCube = new Button()
            {
                Width = 64, Height = 64, Content = new TextBlock {
                    Text = "C"
                }
            };

            overlay.Add(bCaptureFrame);
            overlay.Add(bSwitchToCube);

            overlay.EndDesign();

            return(overlay);
        }
Ejemplo n.º 2
0
 public void Start()
 {
     Daedalus.DirectXWindow = this;
     dxViewer = new DirectXViewer();
     dxViewer.SetTechnique(shaderCollection, techniqueKey);
     dxViewer.Run(new DesktopWpfApplicationContext(ApplicationSurface)
     {
         RequestedWidth  = 576,
         RequestedHeight = 576
     });
     Show();
 }
Ejemplo n.º 3
0
 public DirectXThread()
 {
     thread = new Thread(Run);
     thread.SetApartmentState(ApartmentState.STA);
     directXViewer = new DirectXViewer();
 }