[osg-users] Removing Shader from Program
mew at mew.cx
Fri Oct 26 00:18:15 PDT 2007
As I recall, shader detachment is not fully implemented in OSG. GL has
its own reference-counting and garbage-collection of attachments between
glShaders and glPrograms, and putting a robust OSG wrapper around that
revealed several tedious corner cases that seemed a bit too
resource-intensive for the benefit.
On Thu, October 25, 2007 15:31, Per Fahlberg wrote:
> I'm having problems removing osg::Shader from osg::Program. If a
> osg::Shader is removed from a osg::Program the program is relinked but
> the I don't think the OpenGL shader object is detached from the OpenGL
> program object and if you attach a new osg::Shader the corresponding
> OpenGL shader object is never attached to the OpenGL program.
> I've attached a modifed GL2Scene.cpp from the osgshaders example which
> shows the problem, if 'x' is hit the fragment shader is removed from the
> program but the scene does not change.
More information about the osg-users