Firstly maybe I’ll post about the resource to learn this.
The first place that I really like, is here:
You will get the glimpse how OFX works, how can the Plugin talks to the Host.
Host is the software that uses the plugin (like Natron, Fusion, Nuke, etc).
Basically, there’s an asymmetric how to communicate between the Host and Plugin.
From Plugin to Host, the Plugin can execute some function that Host provides.
But from Host to Plugin, the Host will only execute one general function (the entry point), with the argument, what action that it needs to perform and what arguments, and what output expected.
Some important thing is the Host will ask the Plugin to describe itself, like what his name, what bitdepth it supports, what parameter that it needs, what kind of parameter, etc.
And then there’s a most important action, it’s the render action. Basically the Host will give a rectangle which needs to be filled. And Plugin will try to fill it.
The example in that link is low-level programming, so there’s some task that seems tedious to do. And in the production code, like this:
They don’t use low-level code. They wrap some function, so it’s more easy to use.
They use this library to wrap some code:
And also, there’s some other function that will make life easier to perform common task, like sampling, masking, etc. It’s in this library: