[osg-users] ShaderComposer::releaseGLObjects warning
Robert Osfield
robert.osfield at gmail.com
Mon Apr 25 13:01:57 PDT 2016
Hi Alberto,
On 25 April 2016 at 19:22, Alberto Luaces <aluaces at udc.es> wrote:
> Indeed it does, for example on my system the signature of the method
> changes from
>
> _ZN3osg14ShaderComposer16releaseGLObjectsEPNS_5StateE
>
> to
>
> _ZNK3osg14ShaderComposer16releaseGLObjectsEPNS_5StateE
>
What's the best way to check the signature?
> therefore old programs will not run with this change. I suggest to
> additionally keep also the old, non-const method, since they can
> co-exist. Old binaries will expose the bug, but at least they will
> be able to execute.
>
To the 3.4 branch I've just made the change:
$ git diff
diff --git a/include/osg/ShaderComposer b/include/osg/ShaderComposer
index 68c6d6c..f39d092 100644
--- a/include/osg/ShaderComposer
+++ b/include/osg/ShaderComposer
@@ -39,6 +39,9 @@ class OSG_EXPORT ShaderComposer : public osg::Object
virtual osg::Shader* composeMain(const Shaders& shaders);
virtual void addShaderToProgram(Program* program, const Shaders&
shaders);
+ /// kept for backward compatibility
+ void releaseGLObjects(osg::State* state) { static_cast<const
ShaderComposer*>(this)->releaseGLObjects(state); }
+
virtual void releaseGLObjects(osg::State* state) const;
protected:
Do you think this will be sufficient?
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160425/68747052/attachment-0002.htm>
More information about the osg-users
mailing list