Exemplo n.º 1
0
        public PixelShaderController(IRenderer renderer, ISceneReader sceneReader, IResourceManager resourceManager)
        {
            if (renderer == null)
            {
                throw new ArgumentNullException("renderer");
            }
            if (sceneReader == null)
            {
                throw new ArgumentNullException("sceneReader");
            }
            if (resourceManager == null)
            {
                throw new ArgumentNullException("resourceManager");
            }
            _renderer        = renderer;
            _sceneReader     = sceneReader;
            _resourceManager = resourceManager;

            _resourceManager.Load(ResourcePath);
            _resourceManager.GetMaterials();
            _scene                   = _sceneReader.Read(ScenePath);
            _shapes                  = _scene.Shapes;
            _centralView             = new PixelShaderView();
            _centralView.DataContext = this;
        }
    public PixelShaderController(IRenderer renderer, ISceneReader sceneReader, IResourceManager resourceManager)
    {
      if (renderer == null) throw new ArgumentNullException("renderer");
      if (sceneReader == null) throw new ArgumentNullException("sceneReader");
      if (resourceManager == null) throw new ArgumentNullException("resourceManager");
      _renderer = renderer;
      _sceneReader = sceneReader;
      _resourceManager = resourceManager;

      _resourceManager.Load(ResourcePath);
      _resourceManager.GetMaterials();
      _scene = _sceneReader.Read(ScenePath);
      _shapes = _scene.Shapes;
      _centralView = new PixelShaderView();
      _centralView.DataContext = this;
    }