Exemple #1
0
        public AngleSwapChainPanel()
        {
            lastCompositionScaleX = CompositionScaleX;
            lastCompositionScaleY = CompositionScaleY;

            glesContext = null;

            renderLoopWorker = null;
            renderOnceWorker = null;

            DrawInBackground = false;
            EnableRenderLoop = false;

            ContentsScale = CompositionScaleX;

            Loaded   += OnLoaded;
            Unloaded += OnUnloaded;

            CompositionScaleChanged += OnCompositionChanged;
            SizeChanged             += OnSizeChanged;

            var binding = new Binding
            {
                Path   = new PropertyPath(nameof(Visibility)),
                Source = this
            };

            SetBinding(ProxyVisibilityProperty, binding);
        }
Exemple #2
0
        private void Initialize()
        {
            if (designMode)
            {
                return;
            }

            //Multisampling = GlesMultisampling.FourTimes; not yet supported
            DepthFormat   = GlesDepthFormat.Format24;
            StencilFormat = GlesStencilFormat.Format8;

            Context = new GlesContext();
        }