Re: [osg-users] Shader, OpenGL context and Qt

2016-09-20 Thread Valerian Merkling
Hi, After a few more days of search, I can resume my problem in a more simple way : I've a set of osg::Program. Each Widgets has its own 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_p

Re: [osg-users] Shader, OpenGL context and Qt

2016-09-16 Thread Valerian Merkling
Hi, I'm still stuck with my shaders problem and I ran out of ideas, but I have new elements, and a new question. My shader works on the first view, so this code is ok (ie thoses two shaders works fine) : Code: osg::ref_ptr vertex=new osg::Shader(osg::Shader::Type::VERTEX, vertex_source); os

[osg-users] Shader, OpenGL context and Qt

2016-09-12 Thread Valerian Merkling
Hi, I'm working on a GIS app based on Qt and OpenGL, and I'm replacing all OpenGL calls with OSG 3.4.0. I can display multiples views. Each view is independant, hold in QGLWidets, got only one camera and its own scenegraph, and a new instances of osg::Program and osg::Shader (no osg objects sh