Esempio n. 1
0
        public static GraphicsDevice CreateOutputTargetView(IFrameRenderableSurface surface)
        {
            var adapter = GetAdapter();
            var proxy   = new RenderToTargetViewDeviceProxy(adapter, surface.Size);

            return(new GraphicsDevice(proxy, surface.Size, adapter.Description));
        }
Esempio n. 2
0
 //public SynchronizedGraphics(IFrameRenderableSurface surface)
 //    : this(GraphicsDeviceFactory.CreateOutputTargetView(surface), surface) {
 //}
 SynchronizedGraphics(GraphicsDevice device, IFrameRenderableSurface surface)
 {
     Device               = device;
     surface.Resized     += OnResized;
     surface.Invalidated += OnInvalidated;
     this.surface         = surface;
     synchronizer         = new SynchronizationContext <SynchronizedGraphics, Size>(this);
 }
Esempio n. 3
0
 public SynchronizedGraphics(IFrameRenderableSurface surface)
 {
     Device               = GraphicsDeviceFactory.CreateOutputTargetView(surface);//CreateOutputTextureDevice
     surface.Resized     += OnResized;
     surface.Invalidated += OnInvalidated;
     this.surface         = surface;
     synchronizer         = new SynchronizationContext <SynchronizedGraphics, Size>(this);
 }
Esempio n. 4
0
 public GraphicsFrameWithSurface(GraphicsDevice device, IFrameRenderableSurface surface) : base(device)
 {
     this.surface = surface;
     surface.StartFrame(Graphics);
 }
Esempio n. 5
0
 public static RenderEngine Create(IFrameRenderableSurface surface,
                                   IInputManager inputManager, IContextState context, EngineNotificator notificator)
 {
     return(new RenderEngine(GraphicsDeviceFactory.CreateOutputTargetView(surface),
                             surface, inputManager, context, notificator));
 }