void SetupGL() { Typography.FontManagement.InstalledTypefaceCollectionExtensions.CustomSystemFontListLoader = LoadFonts; var view = (GLKView)View; view.Context = context; view.DrawableDepthFormat = GLKViewDrawableDepthFormat.Format24; _view_width = (int)view.Frame.Width; _view_height = (int)view.Frame.Height; EAGLContext.SetCurrentContext(context); // _max = Math.Max(_view_width * 2, _view_height * 2); _appHost = new LayoutFarm.AppHostIOS(this, _max, _max); _htmlBox = new Demo_UIHtmlBox(); _appHost.StartApp(_htmlBox); }
// This gets called when the drawing surface is ready protected override void OnLoad(EventArgs e) { base.OnLoad(e); Android.Graphics.Point sc_size = new Android.Graphics.Point(); Display.GetSize(sc_size); _viewWidth = sc_size.X; _viewHeight = sc_size.Y; MakeCurrent(); //----------- _max = Math.Max(_viewWidth, _viewHeight); _appHost = new LayoutFarm.AppHostAndroid(this, _max, _max); _htmlBox = new Demo_UIHtmlBox(); _appHost.StartApp(_htmlBox); //----------- // Run the render loop Run(); }