开发者

hardware acceleration / performance and linkage of different macosx graphics apis, frameworks and layers

开发者 https://www.devze.com 2022-12-18 07:10 出处:网络
the more i read about the different type of views/context/rendering开发者_如何转开发 backends, the more i get confused.

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:

  • http://developer.apple.com/leopard/overview/graphicsandmedia.html
  • http://theocacao.com/document.page/306
  • http://lists.apple.com/archives/quartz-dev/2007/Jun/msg00059.html

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消