Beispiel #1
0
        public void LoadExample(DemoBase demoBase)
        {
            _gfxViewRoot.MakeCurrent();


            GLPainterCore pcx       = _gfxViewRoot.GLPainterCore();
            GLPainter     glPainter = _gfxViewRoot.GetGLPainter();

            pcx.SmoothMode = SmoothMode.Smooth;//set anti-alias

            //create text printer for opengl
            demoBase.Init();
            _demoBase = demoBase;

            _demoUI = new DemoUI(demoBase, _myWidth, _myHeight);
            _demoUI.SetCanvasPainter(pcx, glPainter);
            //-----------------------------------------------
            //demoBase.SetEssentialGLHandlers(
            //    () => _glControl.SwapBuffers(),
            //    () => _glControl.GetEglDisplay(),
            //    () => _glControl.GetEglSurface()
            //);
            //-----------------------------------------------

            DemoBase.InvokeGLPainterReady(demoBase, pcx, glPainter);
            //Add to RenderTree
            _rootGfx.AddChild(_demoUI.GetPrimaryRenderElement());
        }
Beispiel #2
0
 public void LoadExample(DemoBase exBase)
 {
     _demoUI = new DemoUI(exBase, _myWidth, _myHeight);
     _rootGfx.AddChild(_demoUI.GetPrimaryRenderElement(_surfaceViewport.RootGfx));
 }