[osg-users] osg::Drawable vs osg::Geometry

Julien Valentin julienvalentin51 at gmail.com
Sun Oct 21 13:11:23 PDT 2018

If you can fit in osg::Geometry semantic your data and just want to override drawimplementation, guidelines prescribe to setup a DrawCallback.
using osg::Geometry have also the advantage for your data to be interpreted for various task in osg (computebound,primitivefunctors, osgutil visitors..)
If you really need to subclass, prefer Drawable over Geometry if you don't want osg can interpret your Drawable as a Geometry (which is sometime the case..)


NoeMurr wrote:
> Hi,
> I need to draw a custom object in osg. 
> To do that I have to choose between derive from class osg::Drawable and deriving from osg::Geometry. 
> Which is the more efficient way to create a custom drawable object and why? 
> Thank you!
> p.s. I'm new to osg, so I'm trying to understand the best practices.
> Cheers,
> Noè

Twirling twirling twirling toward freedom

Read this topic online here:

More information about the osg-users mailing list