Example #1
0
        private void Init()
        {
            // default
            ContextRenderingApi        = GLVersion.ES1;
            mHolder                    = Holder;
            RenderThreadRestartRetries = 3;

            // Add callback to get the SurfaceCreated etc events
            mHolder.AddCallback(this);
            // Force the SurfaceType to be Gpu to API_11 and earlier
            // it is ignored in later API's
            mHolder.SetType(SurfaceType.Gpu);
            windowInfo = new AndroidWindow(mHolder);

            pauseSignal = new ManualResetEvent(true);
        }
Example #2
0
        public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
        {
            AndroidWindow android_win = (AndroidWindow)window;

            return(new Android.AndroidGraphicsContext(handle, android_win.CreateEglWindowInfo(), shareContext, major, minor, flags));
        }