VSTGUI4 and pure opengl editor

I am looking into porting our plugin to VST3 and I would like to use VSTGUI to get a platform independent editor window where I can draw with pure OpenGL (maybe NanoVG).
I just need OpenGL functions, mouse and keyboard events. (No UI components from XML etc.) I cannot find examples on the internet.
How do I create my editor (which class to inherit from)?
How do I use the COpenGLView?
Could you please give me some pointers?

Hi,
for this case, VSTGUI might be overkill. You just have to create a custom IPlugView implementation, where you add either a HWND or an NSView to the parent view which is provided to you in the attached call.

Cheers,
Arne

Thank you for the answer. I agree that I would only use a very small part of VSTGUI.
But if it solves the window creation, opengl library loading, file open/save dialogs, and maybe some text edit controls on both Windows and OSX then I would still use VSTGUI rather than implementing these myself.
I started inheriting from VSTGUIEditor. I don’t have it working yet and still don’t understand how COpenGLView is meant to be used.
Could you please direct me to some examples?

After experimenting I have a test GUI inherited from VSTGUIEditor and a view inherited from COpenGLView. I can have mouse and keyboard events, and I can add views like CTextEdits. I noticed that CTextEdits are covered by the COpenGLView.
I would like to add text edits on top of the opengl view. Is it possible?
vstguiopengl01.png

no, you cannot place anything atop the OpenGL view in VSTGUI.

Cheers,
Arne

Is there a way to add a bool isContextCurrent() method to IPlatformOpenGLView?

I am working with frame buffer objects, too and I need to make sure context is current many times.
Performance would benefit if there was a way to avoid calling makeContextCurrent() when the context is already current.

It would be better if you organize your code so that you don’t need to call makeCurrentContext more than needed.
There are currently no plans to add any changes to the OpenGL stuff as it is deprecated on macOS.

Cheers,
Arne