I am very bad at OSG. I can make Sphere with Geode. My task is create OSG::Geometry Sphere with Vertex and Normals. Can anybody help me?
So not this way:
osg::Sphere* sphere = new osg::Sphere( osg::Vec3(0,0,0), 1.0);
I am very bad at OSG. I can make Sphere with Geode. My task is create OSG::Geometry Sphere with Vertex and Normals. Can anybody help me?
So not this way:
osg::Sphere* sphere = new osg::Sphere( osg::Vec3(0,0,0), 1.0);
Copyright © 2021 Jogjafile Inc.
https://code.google.com/p/osgworks/source/browse/trunk/tests/sphere/sphere.cpp?r=39
There is code in osgWorks to do what you're asking. Either use this code, or examine it to see how you should do it yourself.