Changing the drawing style ?

Changing the drawing style ?

Post by Peter Vrhovs » Thu, 21 Sep 1995 04:00:00



        I am trying to create an object, lets say a sphere which is drawn
in wireframe.  However, the changes that I make do not seem to take effect.
Here is an example bit of code:

        main(int, char **argv)
        {
                Widget myWindow = SoXt::init(argv[0]);

                SoSeparator *root = new SoSeparator;
                root->ref();
                SoDrawStyle *st = new SoDrawStyle;
                st->style = SoDrawStyle::LINES;
                st->pointSize = 2.0;
                root->addChild(st);

                SoXtExaminerViewer *v = new SoXtExaminerViewer;
                v->setSceneGraph(root);
                v->setTitle("Changing the DrawStyle");
                v->show();

                SoXt::show(myWindow);
                SoXt::mainLoop();
        }