Multi-Frame Rendering Effect C++ SDK and OpenGL
Hi all,
I've got a third-party Effect for After Effect which extensively rely on OpenGL for rendering.
Even though the effect rendering process is fast, I still try to get rid of the warning icon introduced in latest After Effects version related to the "Multi-Frame Rendering" feature.
Although enabling that feature in an effect is quite straight-forward, it seems that this feature doesn't play well when the effect relies on OpenGL. I do now that using OpenGL with a multithreaded CPU host architecture requires some set up, but unfortunately I cannot find any guidelines in After Effects C++ documentation, nor in this forum.
One failure trial that I've tried, is "hacking" the class AESDK_OpenGL_EffectCommonData that's inside the GL_base.cpp and GL_base.h files, by mainaining some sort of OpenGL context cache for each thread by its id. The main idea is that OpenGL context shouldn't be shared across threads, but rather each should have its own. At each Render() call, I call for AESDK_OpenGL_EffectCommonData::SetPluginContext() which was originally used the same OpenGL context, and now I create a new one for each thread(if such hasn't created already).
I also tried to use the GLator sdk example provided for macOS, it compiles successfully but crashes immediatly when launching After Effect.
I'll appreciate any guidelines regarding of how to enable the "Multi-Frame Rendering" for a custom thrid-party effect that works extensively with OpenGL.
