Пример #1
0
		public EAGLView (NSCoder coder) : base (coder)
		{
			CAEAGLLayer eaglLayer = (CAEAGLLayer) Layer;
			eaglLayer.Opaque = true;
			eaglLayer.DrawableProperties = new NSDictionary (
				EAGLDrawableProperty.RetainedBacking, false,
				EAGLDrawableProperty.ColorFormat, EAGLColorFormat.RGBA8
			);
			Context = (iPhoneOSGraphicsContext) ((IGraphicsContextInternal) GraphicsContext.CurrentContext).Implementation;

			Context.MakeCurrent(null);
			AnimationInterval = 1.0 / 60.0;
		}
Пример #2
0
		public EAGLView (NSCoder coder) : base (coder)
		{
			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);
			AnimationInterval = 1.0 / 60.0;
		}
Пример #3
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();
        }