|
我是这个环境的,编译osgviewerQt例子通过了,没有警告,但一直没有显示出窗口。
其中main函数如下:
int main( int argc, char** argv )
{
osg::ArgumentParser arguments(&argc, argv);
osgViewer::ViewerBase::ThreadingModel threadingModel = osgViewer::ViewerBase::CullDrawThreadPerContext;
while (arguments.read("--SingleThreaded")) threadingModel = osgViewer::ViewerBase::SingleThreaded;
while (arguments.read("--CullDrawThreadPerContext")) threadingModel = osgViewer::ViewerBase::CullDrawThreadPerContext;
while (arguments.read("--DrawThreadPerContext")) threadingModel = osgViewer::ViewerBase:rawThreadPerContext;
while (arguments.read("--CullThreadPerCameraDrawThreadPerContext")) threadingModel = osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext;
QApplication app(argc, argv);
ViewerWidget* viewWidget = new ViewerWidget(threadingModel);
viewWidget->setGeometry( 100, 100, 800, 600 );
viewWidget->show();
return app.exec();
}
我就进行debug,发现运行到“viewWidget->setGeometry( 100, 100, 800, 600 );”这行就不动了,cpu占有达到30%,什么也不显示。。。求大神指点!! |
|