Exemple #1
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Create our OpenGL view, and display it
			GLView1 view = new GLView1 (this);
			SetContentView (view);
		}
Exemple #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create our OpenGL view, and display it
            GLView1 view = new GLView1(this);

            SetContentView(view);
        }
Exemple #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            s_assetManager = this.Assets;

            Typography.FontManagement.InstalledTypefaceCollectionExtensions.CustomSystemFontListLoader = LoadFonts;
            Typography.FontManagement.InstalledTypefaceCollectionExtensions.CustomFontStreamLoader     = LoadFont;

            view = new GLView1(this);
            SetContentView(view);
        }
Exemple #4
0
        public AppHostAndroid(GLView1 vw, int canvasW, int canvasH)
        {
            //---------------------------------------
            //this specific for WindowForm viewport
            //---------------------------------------
            _vw = vw;
            _formTitleBarHeight = 0;
            _canvasW            = canvasW;
            _canvasH            = canvasH;

            _primaryScreenWorkingAreaW = vw.ViewWidth;
            _primaryScreenWorkingAreaH = vw.ViewHeight;

            string basedir = "";

            PixelFarm.Platforms.StorageService.RegisterProvider(new LocalFileStorageProvider(basedir));
            PixelFarm.CpuBlit.MemBitmapExtensions.DefaultMemBitmapIO = new YourImplementation.ImgCodecMemBitmapIO();

            int max = Math.Max(canvasW, canvasH);

            _pcx            = GLPainterContext.Create(max, max, canvasW, canvasH, true);
            _pcx.OriginKind = PixelFarm.Drawing.RenderSurfaceOrientation.LeftTop;

            _painter = new GLPainter();
            _painter.BindToPainterContext(_pcx);
            _painter.SetClipBox(0, 0, canvasW, canvasH);
            _painter.TextPrinter = new GLBitmapGlyphTextPrinter(_painter, PixelFarm.Drawing.GLES2.GLES2Platform.TextService);
            //

            //
            _rootGfx = new MyRootGraphic(canvasW, canvasH, PixelFarm.Drawing.GLES2.GLES2Platform.TextService);


            _drawBoard = new MyGLDrawBoard(_painter);

            SetUpGLSurface();
        }