HI Pjotr,

On 22 May 2014 08:17, Pjotr Svetachov <[email protected]> wrote:
> Sure you can adapt and use it as an example.

Thanks.  Is there any particular license you'd like it to be under?
Public domain/OSGPL/simple statement about it being OK to reuse like
in other examples?

> As you can't have a Drawable::UpdateCallback on a osg::Node it sounds weird 
> that Node::setUpdateCallback(Object*) can accept a Drawable::UpdateCallback. 
> What do you do when someone passes a Drawable::UpdateCallback to a Node? I 
> rather have an compile error than a error/warning at runtime. This is what 
> the code does now, except that the syntax to assign a normal UpdateCallback 
> to a drawable is weird which might prevent people from using/discovering it. 
> I think that if you make Node::UpdateCallback virtual this should be 
> resolved, right?

I wasn't thinking of makeing Node::setUpdateCallback(..) virtual, but
this would be one way of producing an runtime exception when you
assign a Drawabalbe::UpdateCallback to a standard Node.

In general I don't think accidental application of
Drawable::UpdateCallback to a node will be big issue.  Retaining
Drawable::UpdateCallback etc. support is fundamentally backwards
compatibility.

> Also whats the point of a Drawable::Update/Event/CullCallback now, should't 
> they be deprecated now that a Drawable is a Node and can use the Node's 
> callbacks?

We could possible deprecate them, but if we can get everything working
smoothly without removing them we'll be able to retain backwards
compatibility and ease porting to newer versions of the OSG a bit
longer.  I'd like to keep the number of build breaks due to a new
version of the OSG to be kept modest for each new release so we don't
leave behind a good portion of the user base.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to