示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="engine"></param>
        public RenderSystem(Game Game) : base(Game)
        {
            Counters = new RenderCounters();

            Width           = 1024;
            Height          = 768;
            Fullscreen      = false;
            StereoMode      = StereoMode.Disabled;
            InterlacingMode = InterlacingMode.HorizontalLR;
            UseDebugDevice  = false;
            VSyncInterval   = 1;
            MsaaEnabled     = false;
            UseFXAA         = true;

            this.Device = Game.GraphicsDevice;

            spriteEngine  = new SpriteEngine(this);
            filter        = new Filter(this);
            ssaoFilter    = new SsaoFilter(this);
            hdrFilter     = new HdrFilter(this);
            dofFilter     = new DofFilter(this);
            lightRenderer = new LightRenderer(this);
            sceneRenderer = new SceneRenderer(this);
            sky           = new Sky(this);
            bitonicSort   = new BitonicSort(this);
            vtSystem      = new VTSystem(this);

            Game.Config.ExposeConfig(lightRenderer, "LightRenderer", "light");
            Game.Config.ExposeConfig(ssaoFilter, "SSAO", "ssao");
            Game.Config.ExposeConfig(vtSystem, "VirtualTexture", "vt");

            Device.DisplayBoundsChanged += (s, e) => {
                DisplayBoundsChanged?.Invoke(s, e);
            };
        }
示例#2
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="engine"></param>
		public RenderSystem ( Game Game ) : base(Game)
		{
			Counters	=	new RenderCounters();

			Width			=	1024;
			Height			=	768;
			Fullscreen		=	false;
			StereoMode		=	StereoMode.Disabled;
			InterlacingMode	=	InterlacingMode.HorizontalLR;
			UseDebugDevice	=	false;
			VSyncInterval	=	1;
			MsaaEnabled		=	false;
			UseFXAA			=	true;

			this.Device	=	Game.GraphicsDevice;

			viewLayers	=	new List<RenderLayer>();
			spriteEngine	=	new SpriteEngine( this );
			gis				=	new Gis(Game);
			filter			=	new Filter( Game );
			ssaoFilter		=	new SsaoFilter( Game );
			hdrFilter		=	new HdrFilter( Game );
			dofFilter		=	new DofFilter( Game );
			lightRenderer	=	new LightRenderer( Game );
			sceneRenderer	=	new SceneRenderer( Game, this );
			sky				=	new Sky( Game );
			bitonicSort		=	new BitonicSort( Game );

			Device.DisplayBoundsChanged += (s,e) => {
				var handler = DisplayBoundsChanged;
				if (handler!=null) {
					handler(s,e);
				}
			};
		}