/// <summary> /// bind to gl control /// </summary> /// <param name="myGLControl"></param> void BindGLControl(IGpuOpenGLSurfaceView myGLControl) { _windowControl = myGLControl; SetBaseCanvasViewport(_openGLViewport = new OpenGLCanvasViewport(this.RootGfx, _windowControl.GetSize())); RootGfx.SetPaintDelegates( null, //still do nothing this.PaintToOutputWindow); _openGLViewport.NotifyWindowControlBinding(); #if DEBUG _openGLViewport.dbugOutputWindow = this; #endif this.EvaluateScrollbar(); }
/// <summary> /// bind to gl control /// </summary> /// <param name="myGLControl"></param> void BindGLControl(GpuOpenGLSurfaceView myGLControl) { this.windowControl = myGLControl; SetBaseCanvasViewport(this.openGLViewport = new OpenGLCanvasViewport(this.RootGfx, this.windowControl.Size.ToSize(), 4)); RootGfx.SetPaintDelegates( (r) => { }, //still do nothing this.PaintToOutputWindow); openGLViewport.NotifyWindowControlBinding(); #if DEBUG this.openGLViewport.dbugOutputWindow = this; #endif this.EvaluateScrollbar(); }