Hi Robert, Just a quick note. In OpenSceneGraph-3.6.2 in the mipmap.cpp module. I got a warning c:\apis\openscenegraph-3.6.2\src\osg\glu\libutil\mipmap.cpp(6490): warning C4701: potentially uninitialized local variable 'outindex' used
I initialized the declaration on line 6116 To int outindex=0; Everything works -----Original Message----- From: osg-users [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, September 13, 2018 5:04 PM To: [email protected] Subject: osg-users Digest, Vol 135, Issue 16 Send osg-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of osg-users digest..." Today's Topics: 1. Re: Problems porting from osg-3.4.0 to osg-3.6.0 (Herman Varma) 2. Re: Advice requested: Is OSG what I need for my project? (Jan Ciger) 3. Re: Problems porting from osg-3.4.0 to osg-3.6.0 (Robert Osfield) 4. Re: Advice requested: Is OSG what I need for my project? (Chris Hanson) 5. Re: problems with osg-3.4.0 port to osg-3.6.0 (Chris Hanson) ---------------------------------------------------------------------- Message: 1 Date: Thu, 13 Sep 2018 14:47:55 +0200 From: "Herman Varma" <[email protected]> To: [email protected] Subject: Re: [osg-users] Problems porting from osg-3.4.0 to osg-3.6.0 Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8 Hi Robert, I am new in OSG so please be patient. I am still reading the book. Just to clarify I should replace in the class CSimpleInterimShadowTechnique CSimpleInterimShadowTechnique(); CSimpleInterimShadowTechnique(const CSimpleInterimShadowTechnique& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgShadow, CSimpleInterimShadowTechnique); with CSimpleInterimShadowTechnique(); CSimpleInterimShadowTechnique(const CSimpleInterimShadowTechnique& es, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const CSimpleInterimShadowTechnique*>(obj) != NULL; } \ virtual const char* libraryName() const { return "osgShadow"; }\ virtual const char* className() const { return "CSimpleInterimShadowTechnique"; } removing META_object and also add /** Resize any per context GLObject buffers to specified size. */ virtual void resizeGLObjectBuffers(unsigned int maxSize) = 0; /** If State is non-zero, this function releases any associated OpenGL objects for * the specified graphics context. Otherwise, releases OpenGL objects * for all graphics contexts. */ virtual void releaseGLObjects(osg::State* = 0) const = 0; to the class. Do I have this right? Thank you! Cheers, Herman ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74741#74741 ------------------------------ Message: 2 Date: Thu, 13 Sep 2018 14:53:57 +0200 From: Jan Ciger <[email protected]> To: OpenSceneGraph Users <[email protected]> Subject: Re: [osg-users] Advice requested: Is OSG what I need for my project? Message-ID: <calfd4cchbqwno99exd-uha979ndf0v1ba0cl6vu+ua61dfw...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Thu, 13 Sep 2018 at 14:45, Scott Schultz <[email protected]> wrote: > ;tldr version: > > Given a start point and end point, can OSG give me a list of collisions > with geometry along the specified line segment? > > Sure it can do that. There is even an example in the repository for it: https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osgint ersection/osgintersection.cpp J, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/atta chments/20180913/8273eefd/attachment-0001.html> ------------------------------ Message: 3 Date: Thu, 13 Sep 2018 14:31:13 +0100 From: Robert Osfield <[email protected]> To: OpenSceneGraph Users <[email protected]> Subject: Re: [osg-users] Problems porting from osg-3.4.0 to osg-3.6.0 Message-ID: <CAFN7Y+VjnAzmb6zJMV+Qq83TwWnb+bd-79SEn7=Q-=3ncb9...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Hi Harman On Thu, 13 Sep 2018 at 13:55, Herman Varma <[email protected]> wrote: > Just to clarify I should replace in the class CSimpleInterimShadowTechnique > > > CSimpleInterimShadowTechnique(); > CSimpleInterimShadowTechnique(const CSimpleInterimShadowTechnique& es, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); > META_Object(osgShadow, CSimpleInterimShadowTechnique); > > > with > > CSimpleInterimShadowTechnique(); > CSimpleInterimShadowTechnique(const CSimpleInterimShadowTechnique& es, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); > > virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const CSimpleInterimShadowTechnique*>(obj) != NULL; } \ > virtual const char* libraryName() const { return "osgShadow"; }\ > virtual const char* className() const { return "CSimpleInterimShadowTechnique"; } There should be no need to replace the use of META_Object, the original code should be fine. The only reason why META_Object macro wasn't working is because the CSimpleInterimShadowTechnique doesn't implement the pure virtual methods that have been added in 3.6.x - the ones I mentioned above. > and also add > > /** Resize any per context GLObject buffers to specified size. */ > virtual void resizeGLObjectBuffers(unsigned int maxSize) = 0; > > /** If State is non-zero, this function releases any associated OpenGL objects for > * the specified graphics context. Otherwise, releases OpenGL objects > * for all graphics contexts. */ > virtual void releaseGLObjects(osg::State* = 0) const = 0; > > to the class. > > Do I have this right? Yes, but you'll have to actually implement as well :-) Have a look at the include/osgShadow/ShadowMap example as it subclasses from ShadowTechnique is uses META_Objects and override the required methods. Have a look at the src/osgShadow/ShadowMap.cpp to see how the resizeGLObjectBuffers and releaseGLObjects are implemented. Robert ------------------------------ Message: 4 Date: Thu, 13 Sep 2018 18:55:17 +0100 From: Chris Hanson <[email protected]> To: OpenSceneGraph Users <[email protected]> Subject: Re: [osg-users] Advice requested: Is OSG what I need for my project? Message-ID: <CAGoufmYjmum=E=djbzn2rtgvr+onsoklnrsatpb9cjqeb+u...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Seconded, yes. You can also potentially make hierarchical structures of the graph to improve the performance of the intersection process. You would not need ODE. You could even construct an OSG loader to deserialize the sphereville graph natively so that you could use OSG's databasepager and LOD tools to roam around the graph loading and unloading the bounds dynamically. On Thu, Sep 13, 2018 at 1:54 PM Jan Ciger <[email protected]> wrote: > > On Thu, 13 Sep 2018 at 14:45, Scott Schultz <[email protected]> wrote: > >> ;tldr version: >> >> Given a start point and end point, can OSG give me a list of collisions >> with geometry along the specified line segment? >> >> > Sure it can do that. There is even an example in the repository for it: > > https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osgint ersection/osgintersection.cpp > > J, > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] http://www.alphapixel.com/ Training ? Consulting ? Contracting 3D ? Scene Graphs (Open Scene Graph/OSG) ? OpenGL 2 ? OpenGL 3 ? OpenGL 4 ? GLSL ? OpenGL ES 1 ? OpenGL ES 2 ? OpenCL Legal/IP ? Forensics ? Imaging ? UAVs ? GIS ? GPS ? osgEarth ? Terrain ? Telemetry ? Cryptography ? LIDAR ? Embedded ? Mobile ? iPhone/iPad/iOS ? Android @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775) 623-PIXL [7495] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/atta chments/20180913/235e9fc0/attachment-0001.html> ------------------------------ Message: 5 Date: Thu, 13 Sep 2018 18:57:00 +0100 From: Chris Hanson <[email protected]> To: OpenSceneGraph Users <[email protected]> Subject: Re: [osg-users] problems with osg-3.4.0 port to osg-3.6.0 Message-ID: <CAGoufmbP22J-HO74xLp_XJkjoZmJ_bTpEmTHg=ezquoxqbn...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Did you ask Ben himself? He's moving to Hawaii just now, but might be able to comment. I can ping him if you don't get an answer here. On Thu, Sep 13, 2018 at 7:48 AM Herman Varma <[email protected]> wrote: > Hello I am having trouble porting Ben Discoe?s VTP software from > openSceneGraph-3.4.0 to osg-3.6.2 > > The problem lies in replacing the META_object with a macro in > shadowTechnique.h as depicted below. > > Can someone point out where the problem is. > > /** CSimpleInterimShadowTechnique provides an implementation of a depth > map shadow tuned to the needs of VTP.*/ > > class CSimpleInterimShadowTechnique : public osgShadow::ShadowTechnique > { > public: > > // working ********************** in opemSceneGraph-3.4.0 > // CSimpleInterimShadowTechnique(); > // CSimpleInterimShadowTechnique(const > // CSimpleInterimShadowTechnique& es, const osg::CopyOp& > // copyop=osg::CopyOp::SHALLOW_COPY); > // META_Object(osgShadow, CSimpleInterimShadowTechnique); > //*********************************************************** > > // not working *********************in opemSceneGraph-3.6.2 > CSimpleInterimShadowTechnique(); > CSimpleInterimShadowTechnique(const CSimpleInterimShadowTechnique& > es, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); > > virtual bool isSameKindAs(const osg::Object* obj) const { return > dynamic_cast<const CSimpleInterimShadowTechnique*>(obj) != NULL; } \ > virtual const char* libraryName() const { return "osgShadow"; }\ > virtual const char* className() const { return > "CSimpleInterimShadowTechnique"; } > > > //************************************************************** > > > In the new implementation I am getting a C2259 error > > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): error C2259: > 'CSimpleInterimShadowTechnique': cannot instantiate abstract class > > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): note: due to > following members: > > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): note: 'osg::Object > *osg::Object::cloneType(void) const': is abstract > > 2>c:\apis\openscenegraph-3.6.2\build\include\osg\object(80): note: see > declaration of 'osg::Object::cloneType' > > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): note: 'osg::Object > *osg::Object::clone(const osg::CopyOp &) const': is abstract > > 2>c:\apis\openscenegraph-3.6.2\build\include\osg\object(84): note: see > declaration of 'osg::Object::clone' > > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): note: 'void > osgShadow::ShadowTechnique::resizeGLObjectBuffers(unsigned int)': is > abstract > > 2>c:\apis\openscenegraph-3.6.2\build\include\osgshadow\shadowtechnique(66): > note: see declaration of 'osgShadow::ShadowTechnique::resizeGLObjectBuffers' > 2>c:\vtp_vsc\terrainsdk\vtlib\vtosg\nodeosg.cpp(1026): note: 'void > osgShadow::ShadowTechnique::releaseGLObjects(osg::State *) const': is > abstract > 2>c:\apis\openscenegraph-3.6.2\build\include\osgshadow\shadowtechnique(71): > note: see declaration of 'osgShadow::ShadowTechnique::releaseGLObjects' > > The error manifests is in the vtShadow section of nodeOSG.cpp > > ////////////////////////////////////////////////////////////////////// > // vtShadow > // > > vtShadow::vtShadow(const int ShadowTextureUnit, int LightNumber) : > m_ShadowTextureUnit(ShadowTextureUnit), m_LightNumber(LightNumber) > { > setReceivesShadowTraversalMask(ReceivesShadowTraversalMask); > setCastsShadowTraversalMask(CastsShadowTraversalMask); > > #if VTLISPSM > osg::ref_ptr<CLightSpacePerspectiveShadowTechnique> > pShadowTechnique = new CLightSpacePerspectiveShadowTechnique; > // No need to set the BaseTextureUnit as the default of zero is OK > for us > // But the ShadowTextureUnit might be different (default 1) > pShadowTechnique->setShadowTextureUnit(m_ShadowTextureUnit); > pShadowTechnique->setLightNumber(m_LightNumber); > #else > > //errorC2259 cannot instantiate abstract class in openSceneGraph-3.6.2 > //working in osg-3.4.0 > > osg::ref_ptr<CSimpleInterimShadowTechnique> pShadowTechnique = new > > #endif > > #if !VTLISPSM > #if VTDEBUGSHADOWS > // add some instrumentation > pShadowTechnique->m_pParent = this; > #endif > > pShadowTechnique->SetLightNumber(LightNumber); > pShadowTechnique->SetShadowTextureUnit(m_ShadowTextureUnit); > pShadowTechnique->SetShadowSphereRadius(50.0); > #endif > setShadowTechnique(pShadowTechnique.get()); > > SetOsgNode(this); > } > > Help would be appreciated > > > Thank you! > > Cheers, > > Herman Varma > Head of Cartographic Research > Bedford Institute of Oceanography > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=74733#74733 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] http://www.alphapixel.com/ Training ? Consulting ? Contracting 3D ? Scene Graphs (Open Scene Graph/OSG) ? OpenGL 2 ? OpenGL 3 ? OpenGL 4 ? GLSL ? OpenGL ES 1 ? OpenGL ES 2 ? OpenCL Legal/IP ? Forensics ? Imaging ? UAVs ? GIS ? GPS ? osgEarth ? Terrain ? Telemetry ? Cryptography ? LIDAR ? Embedded ? Mobile ? iPhone/iPad/iOS ? Android @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775) 623-PIXL [7495] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/atta chments/20180913/ec89c50a/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ------------------------------ End of osg-users Digest, Vol 135, Issue 16 ****************************************** _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

