本文整理汇总了C++中osg::GLUTWindowRecPtr::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ GLUTWindowRecPtr::resize方法的具体用法?C++ GLUTWindowRecPtr::resize怎么用?C++ GLUTWindowRecPtr::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::GLUTWindowRecPtr
的用法示例。
在下文中一共展示了GLUTWindowRecPtr::resize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reshape
void reshape( int width, int height )
{
winWidth = width;
winHeight = height;
std::cout << "reshape " << width << " " << height << std::endl;
window->resize( width, height );
}
示例2: reshape
void reshape( int width, int height )
{
printf("reshape %d %d\n",width,height);
glViewport(0, 0, width, height);
clientWindow->resize( width, height );
glutPostRedisplay();
}
示例3: reshape
// react to size changes
void reshape(int w, int h)
{
if(glutGetWindow() == mainwinid)
{
mgr->resize(w,h);
glutPostRedisplay();
}
else if(glutGetWindow() == debugwinid)
{
debugwin->resize(w,h);
glutPostRedisplay();
}
}
示例4: main
int main(int argc,char **argv)
{
int winid;
// initialize Glut
glutInit(&argc, argv);
glutInitDisplayMode( GLUT_RGB |GLUT_DEPTH | GLUT_DOUBLE);
if(!argv[1])
{
std::cout << "No name was given!" << std::endl;
return -1;
}
// init OpenSG
OSG::osgInit(argc, argv);
winid = glutCreateWindow(argv[1]);
glutDisplayFunc(display);
glutIdleFunc(display);
glutReshapeFunc(reshape);
glutSetCursor(GLUT_CURSOR_NONE);
ract = OSG::RenderAction::create();
window = OSG::GLUTWindow::create();
window->setGlutId(winid);
window->init();
window->resize(512, 512);
//create a new server that will be connected via multicast
//argv[1] is the name of the server (at least it should be...)
server = new OSG::ClusterServer(window, argv[1], "StreamSock", "");
server->start();
glutMainLoop();
return 0;
}
示例5: reshape
void reshape(int width, int height)
{
window->resize(width, height);
}
示例6: doMain
//.........这里部分代码省略.........
createContainer(composerType.c_str());
OSG::ImageComposer *icPtr =
dynamic_cast<OSG::ImageComposer *>(fcPtr.get());
if(icPtr != NULL)
{
if(dynamic_cast<OSG::PipelineComposer *>(icPtr) != NULL)
{
if(subtilesize>0)
dynamic_cast<OSG::PipelineComposer *>(icPtr)->setTileSize(subtilesize);
dynamic_cast<OSG::PipelineComposer *>(icPtr)->setPipelined(pipelinedBufferRead);
}
if(dynamic_cast<OSG::BinarySwapComposer *>(icPtr) != NULL)
{
if(subtilesize>0)
dynamic_cast<OSG::BinarySwapComposer *>(icPtr)->setTileSize(subtilesize);
}
icPtr->setStatistics(info);
// icPtr->setShort(false);
sortlast->setComposer(icPtr);
}
}
clusterWindow=sortlast;
break;
#ifdef FRAMEINTERLEAVE
case 'I':
frameinterleave=OSG::FrameInterleaveWindow::create();
clusterWindow=frameinterleave;
if(compose)
frameinterleave->setCompose(true);
else
frameinterleave->setCompose(false);
break;
#endif
case 'P':
sortfirst=OSG::SortFirstWindow::create();
sortfirst->setCompose(false);
clusterWindow=sortfirst;
break;
}
if(!autostart.empty())
clusterWindow->editMFAutostart()->push_back(autostart);
for(i=0 ; i<int(servers.size()) ; ++i)
clusterWindow->editMFServers()->push_back(servers[i]);
if(cols < 0)
cols = clusterWindow->getMFServers()->size32() / rows;
switch(type)
{
case 'M':
multidisplay->setHServers(cols);
multidisplay->setVServers(rows);
break;
case 'X':
balancedmultidisplay->setHServers(cols);
balancedmultidisplay->setVServers(rows);
// balancedmultidisplay->setShowBalancing(true);
// balancedmultidisplay->setShowBalancing(info);
break;
}
#ifdef FRAMEINTERLEAVE
clusterWindow->setInterleave(interleave);
#endif
// create client window
clientWindow=OSG::GLUTWindow::create();
// glutReshapeWindow(800,600);
glutReshapeWindow(winwidth,winheight);
clientWindow->setGlutId(winid);
clientWindow->init();
// init scene graph
init(filenames);
// init client
clusterWindow->setConnectionType(connectionType);
// needs to be called before init()!
clusterWindow->setConnectionParams(connectionParameters);
if(clientRendering)
{
clusterWindow->setClientWindow(clientWindow);
}
clusterWindow->setConnectionDestination(connectionDestination);
clusterWindow->setConnectionInterface(connectionInterface);
clusterWindow->init();
if(serverx > 0)
clusterWindow->resize(serverx,servery);
else
clusterWindow->resize(winwidth,winheight);
clientWindow->resize(winwidth,winheight);
// OSG::FieldContainerFactory::the()->dump();
OSG::commitChanges();
glutMainLoop();
return 0;
}