Пример #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            context = new EAGLContext(EAGLRenderingAPI.OpenGLES2);

            if (context == null)
            {
                Debug.WriteLine("Failed to create ES context");
            }

            var view = (GLKView)View;

            view.Context                = context;
            view.DrawableDepthFormat    = GLKViewDrawableDepthFormat.Format24;
            view.UserInteractionEnabled = true;

            UILongPressGestureRecognizer gr = new UILongPressGestureRecognizer(() => { m_Canvas.Input_MouseButton(1, true); m_Canvas.Input_MouseButton(1, false); });

            gr.CancelsTouchesInView = false;
            view.AddGestureRecognizer(gr);

            SetupGL();
        }