Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     CompositionTarget.Rendering += CompositionTarget_Rendering;
     bmp             = new WriteableBitmap(800, 600, 96, 96, PixelFormats.Bgra32, null);
     tracer          = new RayTracer();
     this.Background = new ImageBrush()
     {
         ImageSource = bmp
     };
 }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            Width  = 720;
            Height = 480;

            var rayTracer = new RayTracer(box);

            KeyDown += rayTracer.KeyDown;

            rayTracer.Run();
        }