本文整理汇总了C++中osg::GLUTWindowRecPtr::setSize方法的典型用法代码示例。如果您正苦于以下问题:C++ GLUTWindowRecPtr::setSize方法的具体用法?C++ GLUTWindowRecPtr::setSize怎么用?C++ GLUTWindowRecPtr::setSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::GLUTWindowRecPtr
的用法示例。
在下文中一共展示了GLUTWindowRecPtr::setSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doMain
// Initialize GLUT & OpenSG and set up the scene
int doMain(int argc, char **argv)
{
std::cout << "start a cluster server with './testClusterServer -w pipe0'\n"
"press 'c' to connect to the servers.\n"
"press 'd' to disconnect from the servers.\n"
"press 'n' to delete current scene.\n"
"press 't' to create a torus.\n"
"press 'l' to load scene 'tie.wrl'.\n"
<< std::endl;
// OSG init
OSG::osgInit(argc,argv);
OSG::VTKPolyDataMapper::getClassType().dump();
// GLUT init
int winid = setupGLUT(&argc, argv);
// the connection between GLUT and OpenSG
_client_win = OSG::GLUTWindow::create();
_client_win->setGlutId(winid);
_client_win->init();
_client_win->setSize(300,300);
for(OSG::Int32 i=0;i<argc-1;++i)
{
if(argv[i+1] != NULL)
_pipenames.push_back(argv[i+1]);
}
if(_pipenames.empty())
_pipenames.push_back("pipe0");
_root = OSG::Node::create();
_root->setCore(OSG::Group::create());
// create default scene
// NodePtr scene = makeTorus(.5, 2, 16, 16);
OSG::NodeUnrecPtr scene = initVTK();
_root->addChild(scene);
// create the SimpleSceneManager helper
_mgr = OSG::SimpleSceneManager::create();
// tell the manager what to manage
_mgr->setWindow(_client_win );
_mgr->setRoot (_root);
// show the whole scene
_mgr->showAll();
return 0;
}