Bartlomiej Bazior :

Ok. I've messed with your code and an example vstplug and just when I
thought "success!" a few issues appeared. First here's the code:
http://www.ckmedia.pl/~fev/nuingl/vstplugin.h
http://www.ckmedia.pl/~fev/nuingl/vstplugin.cpp

now everything works fine until I open the editor, load second plugin
instance and open it's editor. In this case I get a crash. But when
for example I load one plugin instance, then the second one, and open
their editors (when the plugins are loaded), there's no crash but the
second editor is screwed (black rectangles instead of fonts). It
propably happens because instead of:

static nglWindow* mpHiddenContext;
static uint mWindowRef;

I used:

nglWindow* mpHiddenContext;
uint mWindowRef;

I did that, because with static declarations I got errors when linking
(I'm slowly getting fed up with that damn linker :-) ):

vstplugin error LNK2001: unresolved external symbol "private: static unsigned int nglVSTSampleEditor::mWindowRef" ([EMAIL PROTECTED]) vstplugin error LNK2001: unresolved external symbol "private: static class nglWindow * nglVSTSampleEditor::mpHiddenContext" ([EMAIL PROTECTED])

Ok. I've fixed it. It turned out I should learn C++ more, because obviously
I didn't know how to use static class members :-) . Anyway, putting:

nglWindow* nglVSTSampleEditor::mpHiddenContext;
uint nglVSTSampleEditor::mWindowRef = 0;

into .cpp file resolved the problem :-) These should work ok now:
http://www.ckmedia.pl/~fev/nuingl/vstplugin.h
http://www.ckmedia.pl/~fev/nuingl/vstplugin.cpp

But that didn't helped with performance drop I mentioned yesterday.
It seems, that this problem appears when creating new nglWindow (even
if it's not used later on) :-/

cheers,
Bart
--
"When the only tool you know is a hammer,
every problem looks like a nail."

Reply via email to