Skip to main content
Known Participant
March 3, 2025
Answered

Possible have multi GL plugin at one AE instance?

  • March 3, 2025
  • 1 reply
  • 419 views

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.

Correct answer James Whiffin

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. 

1 reply

James Whiffin
James WhiffinCorrect answer
Legend
March 4, 2025

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. 

Known Participant
March 4, 2025

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?

 

James Whiffin
Legend
March 4, 2025

Yes that's correct.