On Thu, Jul 28, 2011 at 11:23 PM, Graham Cox <graham....@bigpond.com> wrote: > Am I right in thinking that using calls such as NSRectFill within a CALayer > like this is really making OpenGL calls behind the scenes? If so it's > probably going as fast as it can. On my middling iMac it's acceptably fast, > but laptops start to show a bit of a slow-down.
No, it's doing the drawing on the CPU on a bitmap context in RAM, then uploading this as a texture to the GPU. > I can think of ways to optimise this, but first I want to know whether this > is truly the fastest way to draw a simple solid rectangle in this situation. > If not, what's better? Set the backgroundColor of the layer and don't draw anything into it. This will just draw a GL quad. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com