Core i7-8700 @ 3.20GHz AMD Radeon R5 240 Win10 system I use the following QT framework and test program.
https://github.com/openscenegraph/osgQt #include <iostream> #include <QApplication> #include <QSurfaceFormat> #include <QGridLayout> #include <QPushButton> #include <osgDB/ReadFile> #include <osgUtil/Optimizer> #include <osg/CoordinateSystemNode> #include <osg/Switch> #include <osg/Types> #include <osgText/Text> #include <osgViewer/Viewer> #include <osgViewer/CompositeViewer> #include <osgViewer/ViewerEventHandlers> #include <osgGA/TrackballManipulator> #include <osgGA/Device> #include <osgEarth/Map> #include <osgEarthDrivers/tms/TMSOptions> #include <osgEarth/MapNode> #include <osgEarth/ImageLayer> #include <osgEarthUtil/EarthManipulator> #include "osgQOpenGLWidget.h" class osgQOpengl : public QWidget { public: osgQOpengl(QWidget *parent = 0) :QWidget(parent) { setMinimumSize(800, 600); setFocusPolicy(Qt::StrongFocus); } public: void init() { // _pOsgW = new osgQOpenGLWidget(); _pOsgW->setFocus(); _layout = new QGridLayout(this); // optimize the scene graph, remove redundant nodes and state etc. QMargins marginsLayout(0, 0, 0, 0); _layout->setContentsMargins(marginsLayout);; _layout->addWidget(_pOsgW, 0, 0, 100, 100); // QObject::connect(_pOsgW, &osgQOpenGLWidget::initialized, [this] { osg::ref_ptr<osg::Node> loadedModel = nullptr; loadedModel = osgDB::readNodeFile("E:/ceep.ive"); loadedModel->getOrCreateStateSet()->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON); root->addChild(loadedModel); osg::ref_ptr<osgViewer::View> pView = new osgViewer::View; pView->setCameraManipulator(new osgGA::TrackballManipulator()); pView->setSceneData(root); // _pOsgW->addView(0, 0, 0, width(), height(), pView, osg::Vec4(0, 0, 0, 1)); // return 0; }); } public: osgQOpenGLWidget * _pOsgW = nullptr; QGridLayout* _layout = nullptr; }; int main(int argc, char** argv) { QApplication app(argc, argv); // osgQOpengl pp; pp.init(); pp.showMaximized(); return app.exec(); } -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/b7163b02-071c-4c83-8685-560ea00de2den%40googlegroups.com.
