[osg-users] Allocating osg::image from my own data buffer
Hello, the following code block is creating an image from a buffer I own. This does not allocate a new buffer, but assumes my buffer will not be deallocated. How do I create a new, independent osg::Image copying data from my buffer to an internal array? osg::Image img = osg::image(); img->setImage( width, height, 1, internalTextureFormat(), type(), MyDataBuffer(), osg::Image::NO_DELETE); ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Ubuntu build failed the latest from github
Thanks Robert! On Mon, Aug 22, 2016 at 8:58 PM, Robert Osfieldwrote: > HI Nick, > > I haven't had a chance to fix the old Inventor plugin, as you'll note > from the warnings it's still tied to the dprecated_osg::Geometry which > I have now removed in git master. > > For the time being just comment out the Inventor plugin or set the > include path to empty for Coin to prevent the plugin from building. > > Robert. > > On 22 August 2016 at 14:10, Trajce Nikolov NICK > wrote: > > Hi Community, > > > > after a long journey with OSG on Windows, I am now back to Linux > development > > > > I have clean install and the latest from github. Here is where it fails > (any > > clue?): > > > > In file included from > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:79:0: > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:30: > > error: ‘deprecated_osg’ does not name a type > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: > > error: expected unqualified-id before ‘*’ token > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > >^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: > > error: expected ‘)’ before ‘*’ token > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:46: > > error: expected ‘;’ at end of member declaration > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:56: > > error: ISO C++ forbids declaration of ‘g’ with no type [-fpermissive] > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: > > error: ISO C++ forbids declaration of ‘InventorState’ with no type > > [-fpermissive] > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > >^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: > > error: expected ‘;’ at end of member declaration > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: > > error: ISO C++ forbids declaration of ‘ivState’ with no type > [-fpermissive] > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: > > error: expected ‘;’ at end of member declaration > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:81: > > error: expected unqualified-id before ‘)’ token > >void processGeometry(const deprecated_osg::Geometry *g, InventorState > > *ivState); > > > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:132:58: > > error: ‘InventorState’ is not a type > >void processShapeDrawable(const osg::ShapeDrawable *d, InventorState > > *ivState); > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:134:11: > > error: ‘InventorState’ does not name a type > >virtual InventorState* createInventorState(const osg::StateSet *ss); > >^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ > ConvertToInventor.cpp:556:48: > > error: ‘deprecated_osg’ has not been declared > > SoMFInt32 *field, > > deprecated_osg::Geometry::AttributeBinding binding) > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ > ConvertToInventor.cpp:556:91: > > error: expected ‘,’ or ‘...’ before ‘binding’ > > SoMFInt32 *field, > > deprecated_osg::Geometry::AttributeBinding binding) > > > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp: In > > function ‘void postProcessField(const SbIntList&, > osg::PrimitiveSet::Mode, > > SoMFInt32*, int)’: > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ > ConvertToInventor.cpp:558:7: > > error: ‘binding’ was not declared in this scope > >if (binding==deprecated_osg::Geometry::BIND_OFF || > > binding==deprecated_osg::Geometry::BIND_OVERALL || > >^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ > ConvertToInventor.cpp:558:16: > > error: ‘deprecated_osg’ has not been declared > >if (binding==deprecated_osg::Geometry::BIND_OFF || > > binding==deprecated_osg::Geometry::BIND_OVERALL || > > ^ > > /home/trajce/dev/osg/src/osgPlugins/Inventor/ > ConvertToInventor.cpp:558:63: > > error:
Re: [osg-users] Ubuntu build failed the latest from github
HI Nick, I haven't had a chance to fix the old Inventor plugin, as you'll note from the warnings it's still tied to the dprecated_osg::Geometry which I have now removed in git master. For the time being just comment out the Inventor plugin or set the include path to empty for Coin to prevent the plugin from building. Robert. On 22 August 2016 at 14:10, Trajce Nikolov NICKwrote: > Hi Community, > > after a long journey with OSG on Windows, I am now back to Linux development > > I have clean install and the latest from github. Here is where it fails (any > clue?): > > In file included from > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:79:0: > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:30: > error: ‘deprecated_osg’ does not name a type >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: > error: expected unqualified-id before ‘*’ token >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); >^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: > error: expected ‘)’ before ‘*’ token > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:46: > error: expected ‘;’ at end of member declaration >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:56: > error: ISO C++ forbids declaration of ‘g’ with no type [-fpermissive] >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: > error: ISO C++ forbids declaration of ‘InventorState’ with no type > [-fpermissive] >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); >^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: > error: expected ‘;’ at end of member declaration > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: > error: ISO C++ forbids declaration of ‘ivState’ with no type [-fpermissive] >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: > error: expected ‘;’ at end of member declaration > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:81: > error: expected unqualified-id before ‘)’ token >void processGeometry(const deprecated_osg::Geometry *g, InventorState > *ivState); > > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:132:58: > error: ‘InventorState’ is not a type >void processShapeDrawable(const osg::ShapeDrawable *d, InventorState > *ivState); > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:134:11: > error: ‘InventorState’ does not name a type >virtual InventorState* createInventorState(const osg::StateSet *ss); >^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:556:48: > error: ‘deprecated_osg’ has not been declared > SoMFInt32 *field, > deprecated_osg::Geometry::AttributeBinding binding) > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:556:91: > error: expected ‘,’ or ‘...’ before ‘binding’ > SoMFInt32 *field, > deprecated_osg::Geometry::AttributeBinding binding) > > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp: In > function ‘void postProcessField(const SbIntList&, osg::PrimitiveSet::Mode, > SoMFInt32*, int)’: > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:7: > error: ‘binding’ was not declared in this scope >if (binding==deprecated_osg::Geometry::BIND_OFF || > binding==deprecated_osg::Geometry::BIND_OVERALL || >^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:16: > error: ‘deprecated_osg’ has not been declared >if (binding==deprecated_osg::Geometry::BIND_OFF || > binding==deprecated_osg::Geometry::BIND_OVERALL || > ^ > /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:63: > error: ‘deprecated_osg’ has not been declared >if (binding==deprecated_osg::Geometry::BIND_OFF || > binding==deprecated_osg::Geometry::BIND_OVERALL || >^ >
[osg-users] Ubuntu build failed the latest from github
Hi Community, after a long journey with OSG on Windows, I am now back to Linux development I have clean install and the latest from github. Here is where it fails (any clue?): In file included from /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:79:0: /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:30: error: ‘deprecated_osg’ does not name a type void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: error: expected unqualified-id before ‘*’ token void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:55: error: expected ‘)’ before ‘*’ token /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:46: error: expected ‘;’ at end of member declaration void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:56: error: ISO C++ forbids declaration of ‘g’ with no type [-fpermissive] void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: error: ISO C++ forbids declaration of ‘InventorState’ with no type [-fpermissive] void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:59: error: expected ‘;’ at end of member declaration /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: error: ISO C++ forbids declaration of ‘ivState’ with no type [-fpermissive] void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:74: error: expected ‘;’ at end of member declaration /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:131:81: error: expected unqualified-id before ‘)’ token void processGeometry(const deprecated_osg::Geometry *g, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:132:58: error: ‘InventorState’ is not a type void processShapeDrawable(const osg::ShapeDrawable *d, InventorState *ivState); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.h:134:11: error: ‘InventorState’ does not name a type virtual InventorState* createInventorState(const osg::StateSet *ss); ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:556:48: error: ‘deprecated_osg’ has not been declared SoMFInt32 *field, deprecated_osg::Geometry::AttributeBinding binding) ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:556:91: error: expected ‘,’ or ‘...’ before ‘binding’ SoMFInt32 *field, deprecated_osg::Geometry::AttributeBinding binding) ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp: In function ‘void postProcessField(const SbIntList&, osg::PrimitiveSet::Mode, SoMFInt32*, int)’: /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:7: error: ‘binding’ was not declared in this scope if (binding==deprecated_osg::Geometry::BIND_OFF || binding==deprecated_osg::Geometry::BIND_OVERALL || ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:16: error: ‘deprecated_osg’ has not been declared if (binding==deprecated_osg::Geometry::BIND_OFF || binding==deprecated_osg::Geometry::BIND_OVERALL || ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:558:63: error: ‘deprecated_osg’ has not been declared if (binding==deprecated_osg::Geometry::BIND_OFF || binding==deprecated_osg::Geometry::BIND_OVERALL || ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:559:16: error: ‘deprecated_osg’ has not been declared binding==deprecated_osg::Geometry::BIND_PER_PRIMITIVE_SET) ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:571:11: error: ‘binding’ was not declared in this scope switch (binding) { ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:572:10: error: ‘deprecated_osg’ has not been declared case deprecated_osg::Geometry::BIND_PER_VERTEX: ^ /home/trajce/dev/osg/src/osgPlugins/Inventor/ConvertToInventor.cpp:576:10: error:
Re: [osg-users] Strange problem with QT, OSG and osgdb_dae.so
Hi All, I can load COLLADA models with osg dae plugin in a Qt application correctly. Cheers, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68435#68435 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trouble with NodeMask and shadows
Hi! I have a little issue with a scene with shadows. I need to have within a scene that has shadows an object that doesn't cast and doesn't receive shadows. Here is what I do: constintReceivesShadowTraversalMask=0x1; constintCastsShadowTraversalMask=0x2; intmask=geode->getNodeMask()&~CastsShadowTraversalMask&~ReceivesShadowTraversalMask; geode->setNodeMask(mask); The geode doesn't cast shadows as expected. But unfortunately it receives shadow. I have to mention that the object is in the transparent bin. How can I prevent the object from receiving shadows? - Werner - ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org