views:

118

answers:

1

the more i read about the different type of views/context/rendering backends, the more i get confused.

regarding to http://en.wikipedia.org/wiki/Quartz_%28graphics_layer%29 MacOSX offers Quartz (Extreme) as a render-backend which itself is part of Core Graphics. in the Apple docs and in some books too they say that in any case somehow you use OpenGL (obviously since this operating system uses OpenGL to render all its UI).

i currently have an application that should capture real-time video from a camera (via QTKit which is based on Quicktime but is Cocoa) and i would like to further process the frames (via Core Image, GLSL shaders, etc.).

so far so good. now my question is - does it matter performancewise if you

  • a) draw the captured frame via Quartz and implicitely via OpenGL or
  • b) if you setup an OpenGL context and a DisplayLink and draw the buffered image explicitely via OpenGL?

what would be the advantages or disadvantages of going either way?

i've looked at the different examples (especially CoreImage101 and CoreVideo101) and documents from apple's developer pages but i can't see why they go (or have to go) that way?!?

and i really don't get where Core Video and Core Animation come into play? does going way b) automatically mean i use Core Video? and with which way can i use Core Animation?

additional info:

p.s.: btw, i am on Leopard, so no QuicktimeX confusion yet :)

+1  A: 

Generally speaking OpenGL just gives you more flexibility than the higher level APIs. If the higher level APIs do not offer a feature you need then it is very likely that you will need to drop down to the OpenGL layer.

If they do offer everything you need then you should comparable speed. Perhaps a small (almost negligible) degradation given the Objective-C overhead.

Simon