Skip to main content
Known Participant
Mar 3, 2025 6:48 AM UTC
Answered

Possible have multi GL plugin at one AE instance?

Hi guys!

I found I can only have one OpenGL plugin initialized in an AE instance, if I have two different plugins which is based on AE GL SDK, I can only add the very first on a layer, if I attend to add another one, AE will showup plugin initialization error.

James Whiffin
James WhiffinCorrect answer
Legend
Mar 4, 2025 1:42 AM UTC

If you have multiple different plugins based on the old GLator sample you'll need to change the string on windows (from GL_base.cpp):

// very tricky, windows needs a unique class name for each window instance
// to derive a unique name, a pointer to "this" is used
static std::atomic_int S_cnt;
std::stringstream ss;
ss << "AESDK_OpenGL_Win_Class" << S_cnt.load();
S_cnt++;
className = ss.str();

 If it's the same plugin applied multiple times, this should be ok. 

3 replies

James Whiffin
James WhiffinCorrect answer
Legend
Mar 4, 2025 1:42 AM UTC

If you have multiple different plugins based on the old GLator sample you'll need to change the string on windows (from GL_base.cpp):

// very tricky, windows needs a unique class name for each window instance
// to derive a unique name, a pointer to "this" is used
static std::atomic_int S_cnt;
std::stringstream ss;
ss << "AESDK_OpenGL_Win_Class" << S_cnt.load();
S_cnt++;
className = ss.str();

 If it's the same plugin applied multiple times, this should be ok. 

Translate
Known Participant
Mar 4, 2025 3:44 AM UTC

Really thanks for your help, so my understand is that for each plugin based on the old GLator sample, I only need to change the string "AESDK_OpenGL_Win_Class" to a unique name, that's enough?

 

Translate
James Whiffin
Legend
Mar 4, 2025 11:04 AM UTC

Yes that's correct. 

Translate