Example #1
0
        static void SetUpSoftwareRendererOverGLSurface(
            LayoutFarm.AppHostConfig config,
            IGpuOpenGLSurfaceView myNativeWindow,
            PixelFarm.DrawingGL.GLPainterCore pcx,
            PixelFarm.DrawingGL.GLPainter glPainter,
            InnerViewportKind innerViewPortKind)
        {
            //TODO: review here
            //Temp:
            //

            var surfaceControl = myNativeWindow;

            surfaceControl.MakeCurrent();

            CpuBlitGLESUIElement _cpuBlitUIElem = (innerViewPortKind == InnerViewportKind.GdiPlusOnGLES) ?
                                                  new GdiOnGLESUIElement(surfaceControl.Width, surfaceControl.Height) :
                                                  new CpuBlitGLESUIElement(surfaceControl.Width, surfaceControl.Height);

            //optional***
            //_bridgeUI.SetUpdateCpuBlitSurfaceDelegate((p, area) =>
            //{
            //    _client.DrawToThisCanvas(_bridgeUI.GetDrawBoard(), area);
            //});

            LayoutFarm.RootGraphic rootGfx = config.RootGfx;
            _cpuBlitUIElem.CreatePrimaryRenderElement(pcx, glPainter, rootGfx);

            //*****
            LayoutFarm.RenderBoxBase renderE = (LayoutFarm.RenderBoxBase)_cpuBlitUIElem.GetPrimaryRenderElement();
            rootGfx.AddChild(renderE);
            rootGfx.SetPrimaryContainerElement(renderE);
            //***
        }
Example #2
0
 public void SetOwnerDemoUI(CpuBlitGLESUIElement ui)
 {
     _ui = ui;
 }
Example #3
0
 public void SetOwnerDemoUI(CpuBlitGLESUIElement glesUIElem)
 {
     _glesUIElem = glesUIElem;
 }