discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quartzcore - placing a CALayer inside an NSView?


From: Ivan Vučica
Subject: Re: quartzcore - placing a CALayer inside an NSView?
Date: Thu, 30 May 2013 18:42:13 +0200

That is the road to take, yes. But the widgets don't know how to paint their 
contents into a CGContext, so you have to do absolutely ALL rendering via Opal. 
My GSoC project this year is, as David said, aimed at allowing widgets to paint 
themselves into a CGContext.

Once that is done, NSView will be slightly updated solely to allow storing 
additional CA-specific ivar; it seems to me that everything else can be 
implemented in a simple category.

Note that QuartzCore doesn't calculate the 'next frame time' yet, nor does it 
have a way to notify the hosting view that 'next frame time' has changed, so 
that the timer is rescheduled. So it's not really for practical use -- yet.

But you can implement a hosting view as long as all its content is implemented 
via layers and sublayers, and not via subviews.

Regards,

Ivan Vučica
via phone

On 30. 5. 2013., at 06:17, Mark Aufflick <mark@htb.io> wrote:

> I'm looking at GNUstep NSView and the quartzcore demo app and it looks to me 
> like rendering into an NSOpenGLView is the only way to show a CALayer at the 
> moment - is that right?
> 
> Changing NSView will be a big task, but I'm thinking as an interim of making 
> a generic NSLayerHostingView class based on the DemoOpenGLView - is that a 
> reasonable approach?
> 
> Cheers,
> 
> Mark.
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]