예제 #1
0
        public SelectAction(DxRender.DxDeviceContext devices,
                            DxRender.IDxRenderer render,
                            States states,
                            IOnTickActionContext context)
        {
            _context = context as Context;

            _devices = devices;
            _render  = render;
            _states  = states;

            _rtAspect
                      = new Mitosis.DxRender.TextureRenderTargetAspect(_devices, _devices.FrameWidth, _devices.FrameHeight);
            _stAspect = new Mitosis.DxRender.ObjectSelectingStyleAspect();

            _renderContext = new Mitosis.DxRender.DxRenderContext(_stAspect, _rtAspect);

            foreach (var stateProvider in _context.StateProviders)
            {
                _states.RegisterStateProvider(stateProvider);
            }
        }
예제 #2
0
        public CaptureAction(DxRender.DxDeviceContext devices,
                             DxRender.IDxRenderer render,
                             States states,
                             IOnTickActionContext context)
        {
            _states  = states;
            _devices = devices;
            _render  = render;

            _context = context as Context;

            _imageRttAspect
                = new DxRender.TextureRenderTargetAspect(devices, _context.ImageWidth, _context.ImageHeight);
            _imageRenderContext = new Mitosis.DxRender.DxRenderContext(new DxRender.DefaultStyleAspect(), _imageRttAspect);

            _videoRttAspect
                = new Mitosis.DxRender.TextureRenderTargetAspect(devices, _context.VideoWidth, _context.VideoHeight);
            _videoRenderContext = new Mitosis.DxRender.DxRenderContext(new DxRender.DefaultStyleAspect(), _videoRttAspect);

            foreach (IStateProvider stateProvider in _context.StateProviders)
            {
                _states.RegisterStateProvider(stateProvider);
            }
        }