gloperate
gloperate copied to clipboard
Double initialization of render stage
This call order is fine:
m_canvas->setOpenGLContext();
m_canvas->setRenderStage(...);
However, if called the other way around (as a result of my solution to #393), the render stage is initialized twice: once during setOpenGLContext() and once during the first call to render() (without intermediate deinitialization).
Solution ideas:
- add m_contextInitialized flag to Canvas
- Stage stores a pointer to the context it has been initialized with that can be checked by the Canvas
I like the second idea because it just so happens that I have a Stage that needs this information anyway ;)