public MainRenderer(MainView view)
 {
     mView = view;
     float[] vtmp = { 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f };
     float[] ttmp = { 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f };
     pVertex = ByteBuffer.AllocateDirect(8 * 4).Order(ByteOrder.NativeOrder()).AsFloatBuffer();
     pVertex.Put(vtmp);
     pVertex.Position(0);
     pTexCoord = ByteBuffer.AllocateDirect(8 * 4).Order(ByteOrder.NativeOrder()).AsFloatBuffer();
     pTexCoord.Put(ttmp);
     pTexCoord.Position(0);
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // full screen & full brightness
            this.RequestWindowFeature(WindowFeatures.NoTitle);
            Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
            Window.SetFlags(WindowManagerFlags.KeepScreenOn, WindowManagerFlags.KeepScreenOn);
            mWL = ((PowerManager)GetSystemService(Context.PowerService)).NewWakeLock(WakeLockFlags.Full, "BOB");
            mWL.Acquire();
            mView = new MainView(this);
            SetContentView(mView);
            LinearLayout ll = new LinearLayout(this);
            Button b = new Button(this);
            b.SetText("Hello", TextView.BufferType.Normal);
            ll.AddView(b);
            ll.SetGravity(GravityFlags.CenterHorizontal | GravityFlags.CenterVertical);
            this.AddContentView(ll,
                new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent));
        }