Esempio n. 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);
 }
Esempio n. 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);
 }