Re: Best drawing technology for audio waveforms, envelopes, etc.?
Re: Best drawing technology for audio waveforms, envelopes, etc.?
- Subject: Re: Best drawing technology for audio waveforms, envelopes, etc.?
- From: "E. Wing" <email@hidden>
- Date: Tue, 26 Jun 2007 15:18:59 -0700
(fwiw, I haven't compared Quartz vs OpenGL for line drawing, so I
can't comment if that's a worthwhile area to explore, but some of the
same points apply as for writing your own rasterizer)
I haven't done any 1-to-1 benchmarks of Quartz and OpenGL, but my
experience is that OpenGL is stupidly fast. But it will come at the
cost of quality.
Quartz does a beautiful job with it's antialiasing and features like
rounded caps. It also handles line thickness well.
With OpenGL, you are at the mercy of your video hardware and drivers.
The OpenGL spec says very little about line quality and most video
card manufacturers are more focused on polygons instead of line
primitives. Thus, most hardware I've seen does a pretty ugly job of
rendering lines compared to Quartz.
But the flip side is that you get a lot of speed (though how much is
hardware dependent). But even on older machines (with OpenGL hardware
acceleration), I would expect you to be able to drop in thousands of
points in a line strip without breaking a sweat. Whereas Quartz line
drawing is mostly software bound and applies much more complicated
algorithms to control visual quality.
There is an engineer (who I believe works on Apple's OpenGL team) that
has an interest in the topic of antialiased primitives. He has a web
page up that compares various video cards (a bit dated now) to Quartz.
http://homepage.mac.com/arekkusu/bugs/invariance/index.html
He also provides a library called glAArg which provides an API to
render lines in OpenGL using polygons. His results are pretty good and
performance seems to good so this might be a good compromise path. A
logical path for Apple would be how to figure out how to apply these
techniques to Quartz to get more speed, but Quartz I believe has very
stringent requirements that things be pixel perfect and identical from
machine to machine which makes this hard.
One more thing though, if you need to print or need a PDF (vector
scalable), OpenGL sucks for this and Quartz rules. (This is an issue I
struggle with as I am in the OpenGL track.)
-Eric
_______________________________________________
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