Пример #1
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);
 }
Пример #2
0
 public SynchronizedGraphics(IRenderableWindow surface)
 {
     Device               = GraphicsDeviceFactory.CreateOutputHandleDevice(surface);
     surface.Resized     += OnResized;
     surface.Invalidated += OnInvalidated;
     this.surface         = surface;
     synchronizer         = new SynchronizationContext <SynchronizedGraphics, Size>(this);
 }