I read some articles how to draw for example in my case one triangle to two different top-level windows. They are both sharing context.
My hierarchy is following:
> Application > MainWindow > GraphicsWindow1 > Triangle
> GraphicsWindow2 (contains link to GraphicsWindow1)

When GraphicsWindow2 renders he take Triangle from GW1 and calls Draw. I suppose that should be all. But there is not drawed triangle in GW2.

My goals: render in GW2 same thing as in GW1 but with different camera. Also I tried to build this with some efficient like few lines of code.

Source code is available on github: https://github.com/glararan/Qt-OpenGL

GraphicsWindow inherits from GLWindow which inherits from QOpenGLWindow.

GraphicsWindow location: https://github.com/glararan/Qt-OpenG...hicswindow.cpp
Triangle location: https://github.com/glararan/Qt-OpenG...e/triangle.cpp
Shaders are located here: https://github.com/glararan/Qt-OpenG.../shaders/basic

I have to missing something, just I don't know what.

Thanks for help!