iPlug2 Forum

How to draw pixels/shapes in iPlug2?

I’m trying to learn how to use iPlug2 and was wondering how to draw a waveform, Sorry if this has been asked before or if my question isn’t specific enough.

You could check out the IVScopeControl control to get started (https://github.com/iPlug2/iPlug2/blob/master/IGraphics/Controls/IVScopeControl.h).

It is used in this example: https://github.com/iPlug2/iPlug2/tree/master/Examples/IPlugControls

But “drawing a waveform” is not very specific.

  • It could be static or dynamic (like in the example).
  • Half wave or full wave.
  • Filled not filled.

You will find some more hints and theory doing a Google search.

A waveform control is something i’d like to add to the controls library at some point.

for now, as asedev says you can looks at IVScopeControl etc: which draw their lines using vector graphics paths.


pixel by pixel drawing is not really recommended, although we are working on a solution for that that can be used with different graphics backends.