Closed ChenKe404 closed 1 year ago
_vertexArrayPtr is null
i set indices like this,i think it's right.
I create vertex array use osg::Vec3dArray before : "osg::ref_ptr
I think this is a hidden bug that could cause the program to crash.
I am surprised it causes a crashed, but it's correct the TemplatePrimitiveFunctor doesn't support double vertex arrays, it's a limitation rather than a bug. It shouldn't crash, instead ideally should report an unsupported error.
Graphics hardware is handles double vertex arrays very poorly so I would recommend against ever use a osg::vec3dArray as a vertex array for this reason. The only time a osg::vec3dArray is really useful in the scene graph is in cases where you have a loader that passes back double vertices with the intention of post processing the data into a form more suitable for graphics.
To handle large coordinate frames use a MatrixTransform above geometry/subgraph so that the subgraph has a local origin and can safely use float arrays suitable for graphics hardware, while the MatrixTransform places the subgraph into world coordinates. I've written about this many times on the osg-users mailing list/google group so have a look through the archives.
I got it,thanks for your help
Crashed when the intersection visitor through the subclass created from osg::Node. Crashed when calling function "osgUtil::IntersectionVisitor::apply".
OSG 3.7.0(master) + osgQt(master) My subclass derived from osg::Node