• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the best frame rate for NSView drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the best frame rate for NSView drawing


  • Subject: Re: Getting the best frame rate for NSView drawing
  • From: Per Bull Holmen <email@hidden>
  • Date: Fri, 30 Mar 2012 01:47:43 +0200

Den 19:04 29. mars 2012 skrev Kyle Sluder <email@hidden> følgende:
> On Mar 29, 2012, at 5:12 AM, lbland <email@hidden> wrote:
>
>> ... look at the call stack. On the Mac fill most likely calls opengl in the end as "Quartz GL" has gotten pretty good.
>
> Quartz GL is not enabled by default.
>
> Also, see this: http://cocoawithlove.com/2011/03/mac-quartzgl-2d-drawing-on-graphics.html
>
> --Kyle Sluder

I notice that while filling rectangles is much faster, drawing lines
are slower with QuartzGL. Also, while filling rectangles behaves
exactly the same way in Quartz as in pure OpenGL, stroking lines do
not. If you magnify your drawing by manipulating the bounds of the
view, the width of the lines changes in Quartz. If you do the same
thing by manipulating the projection matrix in OpenGL, the lines stay
the same width, only the shapes are enlargened. This has led me to
believe that lines drawing in Quartz is more complex than simple line
drawing in OpenGL. Probably also higher quality. I have no idea
whether there is any connection there. I suspect text rendering is
software-based also in QuartzGL. Hard to tell. The timings were very
similar.

One key to high performance GPU-accelerated drawing is to make sure
that data that doesn't change, doesn't have to be transferred back and
forth between the CPU and GPU. I think, perhaps, it may be hard for
the higher-level APIs to have enough information to ensure this. You
may need detailed information about how your program will behave.

Per

_______________________________________________

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


References: 
 >Getting the best frame rate for NSView drawing (From: Kenneth Baxter <email@hidden>)
 >Re: Getting the best frame rate for NSView drawing (From: Graham Cox <email@hidden>)
 >Re: Getting the best frame rate for NSView drawing (From: "email@hidden" <email@hidden>)
 >Re: Getting the best frame rate for NSView drawing (From: lbland <email@hidden>)
 >Re: Getting the best frame rate for NSView drawing (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Custom NSClipView and overlay scrollers
  • Next by Date: Re: Trouble with code signing and app store submission
  • Previous by thread: Re: Getting the best frame rate for NSView drawing
  • Next by thread: Re: Getting the best frame rate for NSView drawing
  • Index(es):
    • Date
    • Thread