Code: Select all
#PB_OpenGL_SetContextCode: Select all
GetGadgetAttribute(openGLgadgetNum, #PB_OpenGL_SetContext )The same question came when using wegGL / webView: viewtopic.php?p=636229#p636229
In practice, the first opened OpenGLgadget() gets context 0, the second one has context = 1, and so on. It works. But becomes unusable when the user has the freedom to dynamically create and and close windows and their OpenGLgadget()'s. The context number is needed after dynamic creation of an OpenGLgadget().
Is there a quick workaround by importing something from a library and skipping the standard GetGadgetAttribute() ?
Thanks. (PB v.6.21 on linux Zorin with Wayland, msi GP72 2QE Leopard Pro)

