Radium-Engine icon indicating copy to clipboard operation
Radium-Engine copied to clipboard

OpenGL context creation

Open dlyr opened this issue 6 years ago • 3 comments

According to this example QOpenGLContext can be created only when the widget is exposed. As I check, I think it is legal to create the context in ctor, but one can not use it (i.e. makeCurrent) until exposition. (The latter may happen if the surface is not exposed, or the graphics hardware is not available due to e.g. the application being suspended.here) First tests let think that we can not force exposition in ctor, so we have to wait the application to run.

Conclusion, we need to defer opengl related initialization, I have tested a quick fix which consists in create a lambda/function with initialization and attached it to glInitialized Vewier's signal. i could polish it, but if it's the right direction. Any comments ?

dlyr avatar Feb 20 '20 11:02 dlyr

Could you give a link pointing to your quick test, so we could have a look ? But I see no problem at deferring the initialization.

nmellado avatar Mar 25 '20 20:03 nmellado

here it is, but it's not polished clean code, and there is rest of my experiments ... I have also do a quick rebase, so I didn't test if everything works well.

dlyr avatar Apr 02 '20 21:04 dlyr

Did #673 fixed this issue ?

nmellado avatar Feb 04 '21 08:02 nmellado