Пример #1
0
 public VisualForm(IVisualRenderer visual,
                   HostedControl <Bitmap> control)
 {
     _control       = control;
     _availableSize = new Size(Width, Height);
     Visual         = visual;
 }
        public GLWindowsContext(IHost viewHost,
                                OpenGLVersion glVersion,
                                GLWindowBuilder windowBuilder,
                                Task <IntPtr> deviceContextPromise,
                                Byte bitDepth = 32)
        {
            _dibSection    = new DIBSection();
            _delegateCache = new DelegateCache();
            _currentSize   = new Size(0, 0);
            _windowBuilder = windowBuilder;

            _viewHost = viewHost;
            _viewHost.AvailableSizeChanged += OnHostSizeChanged;

            _bitDepth = bitDepth;
            _requestedOpenGLVersion = glVersion;

            deviceContextPromise.ContinueWith(OnDeviceContextAvailable);
        }