Exemplo n.º 1
0
Arquivo: game.cs Projeto: tincann/AGR
        public void Init(OpenTKApp app, CancellationToken exitToken)
        {
            _exitToken = exitToken;
            _app = app;
            _tasks = new Task[parallelBundles];
            _r = RNG.CreateMultipleRNGs(parallelBundles);
            
            Screen.Clear(0x2222ff);
            _acc = new Accumulator(Screen);

            //var tracer = new WhittedStyleTracer();
            var tracer = new PathTracer();
            _scene = new Scene(tracer, constructBVH: true);
            _sceneManager = new SceneManager(_camera, _scene);

            _sceneManager.Add(SceneDefinitions.Default);
            _sceneManager.Add(SceneDefinitions.DarkRoom);
            _sceneManager.Add(SceneDefinitions.PathTracerBoxCool);
            _sceneManager.Add(SceneDefinitions.PathTracerBox);
            _sceneManager.Add(SceneDefinitions.BeerTest);
            _sceneManager.Add(SceneDefinitions.Teapot);
            
            _sceneManager.SetScene(0);

            Statistics.Enabled = false;
        }
Exemplo n.º 2
0
Arquivo: game.cs Projeto: tincann/AGR
        public void Init(OpenTKApp app, CancellationToken exitToken)
        {
            _exitToken = exitToken;
            _app       = app;
            _tasks     = new Task[parallelBundles];
            _r         = RNG.CreateMultipleRNGs(parallelBundles);

            Screen.Clear(0x2222ff);
            _acc = new Accumulator(Screen);

            //var tracer = new WhittedStyleTracer();
            var tracer = new PathTracer();

            _scene        = new Scene(tracer, constructBVH: true);
            _sceneManager = new SceneManager(_camera, _scene);

            _sceneManager.Add(SceneDefinitions.Default);
            _sceneManager.Add(SceneDefinitions.DarkRoom);
            _sceneManager.Add(SceneDefinitions.PathTracerBoxCool);
            _sceneManager.Add(SceneDefinitions.PathTracerBox);
            _sceneManager.Add(SceneDefinitions.BeerTest);
            _sceneManager.Add(SceneDefinitions.Teapot);

            _sceneManager.SetScene(0);

            Statistics.Enabled = false;
        }
Exemplo n.º 3
0
 public static void Main()
 {
     // entry point
     using (var app = new OpenTKApp())
     {
         app.Run(30.0, 0.0);
     }
 }
Exemplo n.º 4
0
 public static void Main()
 {
     // entry point
     using (var app = new OpenTKApp())
     {
         app.Run(30.0, 0.0);
     }
 }