-
WireFrame설정3D Graphics/OSG 2008. 8. 18. 01:58728x90#include <osg/PolygonMode>
...
osg::Switch* mRoot = new osg::Switch;
//Wire Frame Test
osg::ref_ptr<osg::Node> cow = osgDB::readNodeFile("model/cow.osg");//mesh loading
mRoot->addChild(cow, true);//switch node
osg::StateSet* state = cow->getOrCreateStateSet();//Get State
//Create Attribute
osg::PolygonMode* pt = new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK,
osg::PolygonMode::LINE);
//set child Attribute.
state->setAttributeAndModes(pt.get(), osg::StateAttribute::ON || osg::StateAttribute::OVERRIDE);'3D Graphics > OSG' 카테고리의 다른 글
OSG사용시 주의점!! (0) 2008.11.23 [ osg::Box ] 박스 그리기 (0) 2008.08.23 MAX용 *.osg export (0) 2008.08.17 OpenSceneGraph Viewer File Format (0) 2008.08.17 Open Scene graph 윈도우에서 컴파일하기~!! (0) 2008.08.11