Ejemplo n.º 1
0
 public static RenderEngine Create(IRenderableWindow window,
                                   IInputManager inputManager, IContextState context, EngineNotificator notificator)
 {
     GraphicsDeviceFactory.CreateOutputHandleDevice(window);
     return(new RenderEngine(GraphicsDeviceFactory.CreateOutputHandleDevice(window),
                             window, inputManager, context, notificator));
 }
Ejemplo n.º 2
0
        public static GraphicsDevice CreateOutputHandleDevice(IRenderableWindow window)
        {
            var adapter = GetAdapter();
            var proxy   = new RenderToHandleDeviceProxy(adapter, window.Handle, window.Size);

            return(new GraphicsDevice(proxy, window.Size, adapter.Description));
        }
Ejemplo n.º 3
0
 public SynchronizedGraphics(IRenderableWindow surface)
 {
     Device               = GraphicsDeviceFactory.CreateOutputHandleDevice(surface);
     surface.Resized     += OnResized;
     surface.Invalidated += OnInvalidated;
     this.surface         = surface;
     synchronizer         = new SynchronizationContext <SynchronizedGraphics, Size>(this);
 }