Since none of the Apple discussion lists explicitly mention the Motion
FXPLUG API as being within their range, I start here in the OpenGL list. If
there IS a better place to get FXPLUG clarifications, I'd be grateful for
I'm creating a plugin for Motion using the FXPLUG API. I am making it a
hardware-accelerated (openGL texture-based) plugin.
In my algorithm, I need to be able to sample colors from the input image in
order to make decisions.
The input image is provided as an FxTexture, so I can't sample those colors
>From my reading of the API, I should be able to use the createData:withType:
method to copy the input FxTexture's pixels into a new pixel buffer.
Presumably I can then index into the pixel buffer to reference the bytes I
need to get the colors of individual pixels.
However, when I do this, I'm just getting pixel values of 0, even though the
input image is decidely not black!
Any clues? Or am I misunderstanding the function of createData:withType: ?
Code selections, within the renderOutput fxplug routine: