public SynchronizedGraphics(IFrameRenderableSurface surface) { Device = GraphicsDeviceFactory.CreateOutputTargetView(surface);//CreateOutputTextureDevice surface.Resized += OnResized; surface.Invalidated += OnInvalidated; this.surface = surface; synchronizer = new SynchronizationContext <SynchronizedGraphics, Size>(this); }
public SynchronizedGraphics(IRenderableWindow surface) { Device = GraphicsDeviceFactory.CreateOutputHandleDevice(surface); surface.Resized += OnResized; surface.Invalidated += OnInvalidated; this.surface = surface; synchronizer = new SynchronizationContext <SynchronizedGraphics, Size>(this); }