Пример #1
0
        public CanvasView(RectangleF frame,AppDelegate appDelegate)
            : base(frame)
        {
            this.appDelegate = appDelegate;

            CAEAGLLayer eaglLayer = (CAEAGLLayer) Layer;
            eaglLayer.Opaque = true;
            eaglLayer.DrawableProperties = NSDictionary.FromObjectsAndKeys (
                new NSObject []{NSNumber.FromBoolean(false),          EAGLColorFormat.RGBA8},
            new NSObject []{EAGLDrawableProperty.RetainedBacking, EAGLDrawableProperty.ColorFormat}
            );

            Context = (iPhoneOSGraphicsContext) ((IGraphicsContextInternal) GraphicsContext.CurrentContext).Implementation;

            Context.MakeCurrent(null);

            createFrameBuffer ();

            animationInterval = 1.0f / 60.0f;

            SetupView();
            DrawView();
        }
Пример #2
0
 public MainViewController(float[][] drawBuffers,AppDelegate appDelegate)
 {
     this.appDelegate = appDelegate;
     this.drawBuffers = drawBuffers;
 }