[osg-users] ShaderComposer::releaseGLObjects warning

Robert Osfield robert.osfield at gmail.com
Mon Apr 18 12:30:04 PDT 2016


Hi Jannik and Ulrich,

You are right it's a bug, the missing const is an error, rather than the
missing virtual.  I've fixed this and rewritten the implementation of
ShaderCompose::releaseGLObjects() const.

I need to do a build and test before checking it in.

Thankfully ShaderComposer is a not widely used, and deprecated thanks to
#pragmatic shader composition so this error shouldn't effect too many users.

Robert.

On 18 April 2016 at 20:02, Ulrich Hertlein <u.hertlein at sandbox.de> wrote:

> Hi guys,
>
> On 18/04/2016 20:22, Robert Osfield wrote:
> > On 18 April 2016 at 17:39, Andy Skinner <Andy.Skinner at mathworks.com
> > <mailto:Andy.Skinner at mathworks.com>> wrote:
> >
> >     We are getting a warning for ShaderComposer::releaseGLObjects: 'void
> >     osg::ShaderComposer::releaseGLObjects(osg::State *)' : member
> function does not
> >     override any base class virtual member function
>  osg::Object::releaseGLObjects is
> >     virtual, but osg::ShaderComposer::releaseGLObjects is not.  Is there
> a reason why?
> >
> > Sounds like a dodgy compiler warning.
>
> I think not, it looks like an actual bug:
>
> osg::Object
>         virtual void releaseGLObjects(osg::State* = 0) const {}
>
> osg::ShaderComposer
>         void releaseGLObjects(osg::State* state);
>
> The ShaderComposer method is non-const and therefore does not override the
> osg::Object method!
>
> Can we use the 'override' keyword yet?
>
> Cheers,
> /ulrich
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160418/7c8ceb57/attachment-0002.htm>


More information about the osg-users mailing list