Re: opengl rendering outside of -drawRect:
Re: opengl rendering outside of -drawRect:
- Subject: Re: opengl rendering outside of -drawRect:
- From: Richard Charles <email@hidden>
- Date: Sat, 18 Jun 2016 11:14:14 -0600
> On Jun 18, 2016, at 11:04 AM, Richard Charles <email@hidden> wrote:
>
> So I think the takeaway is that draw calls operate within a graphic context. If the context you want and need is the current context then you are good to go.
Just to reiterate, if the context you want to draw to is not active you can simply do this.
[context makeCurrentContext];
So yes, you do not need to call lockFocus, but the context you want must be the current context which is what lockFocus does.
--Richard Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden