QT, OpenGL Context ID and shaders
-
Hi !
I hope someone here will be able to help me.
Here is my problem : I'm working on a GIS app based on Qt, OpenScenegraph and OpenGL.
I'm using dockable widgets, based on osgQt::GLWidget, which is a QGLWidget.
I can load images and display them in thoses widgets, and I can also apply shaders (in GLSL).
I've a set of osg::Program, which is the OpenSceneGraph object containing my shaders.
Each Widgets has its own OpenGL contextID, and contextID can be re-used.
The first time I load the osg::Program "my_program1" on a view with a contextID of 1, it's ok.
If then I load "my_program1" on a view with another contextID, it's still ok.
If I load another osg::Program on a view with a contextID of 1, it's still ok.But if I close / reopen view enough to get another view with a contextID = 1, then loading "my_program1" won't work (the shaders are not used).
Any kind of help / hint is good, I made all the search I could about it and didn't find anythings.
Cheers,
Valerian