Thanks so much for this! I’ll definitely choose this route in the future.
On a separate note, I have had a doubt regarding bitmaps in iPlug2 for a long time, and I hope to get some insight on this. So, here’s the problem I was facing: I wanted to attach a background to my plugin region, which is 2x the size of the plugin region on the screen. I could get this result by doing the following:
const IRECT b = pGraphics->GetBounds();
IBitmap bg = pGraphics->LoadBitmap(BG_FN);
// for 2X
bg.GetAPIBitmap()->SetBitmap(bg.GetAPIBitmap()->GetBitmap(), bg.W()/2, bg.H()/2, 1, 1);
pGraphics->AttachControl(new IBitmapControl(b, bg));
at the beginning of the mLayoutFunc().
It does seem to work for my screen/daw/os version (not sure what matters as of now) and several other systems on which I tested the GUI having Ableton and FL studio. However, on some systems the background image gets displayed at double the size of the plugin region. Which indicates the scaling somehow didn’t work.
The same happened with my knob images (which were 2x) as well; they have the correct location, but appear twice as big as they should be. Does the bitmap API behave differently on different systems?
What might be causing the issue?
Can share a screenshot if needed,
Thanks in advance!