VC3DGraphicsWindowQt
VC3DGraphicsWindowQt::VC3DGraphicsWindowQt(QWidget* parent, Qt::WindowFlags f)
{
osg::DisplaySettings* ds = osg::DisplaySettings::instance().get();
osg::setNotifyLevel(osg::NotifySeverity::FATAL); _traits = new osg::GraphicsContext::Traits();
_traits->windowDecoration = false;
_traits->x = ;
_traits->y = ;
_traits->width = ;
_traits->height = ;
_traits->doubleBuffer = true;
if (ds)
{
_traits->alpha = ds->getMinimumNumAlphaBits();
_traits->stencil = ds->getMinimumNumStencilBits();
_traits->sampleBuffers = ds->getMultiSamples();
_traits->samples = ds->getNumMultiSamples();
}
if (parent)
{
_traits->width = parent->width();
_traits->height = parent->height();
} // create widget if it does not exist
if (!m_opengl_widget)
{
// WindowFlags
Qt::WindowFlags flags = f | Qt::Widget;
// create widget
m_opengl_widget = new VC3DQtOSGWidget(parent, flags);
} m_opengl_widget->setMouseTracking(true);
m_opengl_widget->setFocusPolicy(Qt::WheelFocus);
m_opengl_widget->setGraphicsWindow(this);
useCursor(_traits->useCursor); // initialize State
setState(new osg::State);
getState()->setGraphicsContext(this); // initialize contextID
if (_traits.valid() && _traits->sharedContext.valid())
{
getState()->setContextID(_traits->sharedContext->getState()->getContextID());
incrementContextIDUsageCount(getState()->getContextID());
}
else
{
getState()->setContextID(osg::GraphicsContext::createNewContextID());
} // make sure the event queue has the correct window rectangle size and input range
#if (OPENSCENEGRAPH_MAJOR_VERSION == 3) && (OPENSCENEGRAPH_MINOR_VERSION == 2)
getEventQueue()->syncWindowRectangleWithGraphcisContext();
#else
getEventQueue()->syncWindowRectangleWithGraphicsContext();
#endif
}

VC3DGraphicsWindowQt的更多相关文章
- TeslaManage 2.0编译日志
1>------ 已启动全部重新生成: 项目: TeslaManage, 配置: Debug x64 ------1> Moc'ing teslamanage.h...1> Uic' ...
随机推荐
- 25道Shell面试题
1. 用sed修改test.txt的23行test为tset: sed –i ‘23s/test/tset/g’ test.txt 2. 查看/web.log第25行第三列的内容. sed –n ‘2 ...
- markdown demo 学习
## <center>2019-05-08 12:05 DDoS攻击检测报告</center> ## - **MME ID**: 1123424 - **DDoS攻击类型**: ...
- Mybatis面向接口式编程
Mybatis面向接口编程 1.xml文件书写格式 <?xml version="1.0" encoding="UTF-8" ?> <!DOC ...
- Oracle RAC 服务启动流程
启动流程步骤层次梳理:第一层:OHASD 启动: cssdagent - 负责启动 CSSD 的 Agent.orarootagent - 负责启动所有 root 用户下的 ohasd 资源 的Age ...
- IP数据报首部checksum的计算
IP数据报首部checksum的计算 2009年02月22日 23:23:00 zhangyang0402 阅读数:10897 一.首先区别下面两个概念:(1)one's complement:正 ...
- 简述with原理
with open('x') as f: for line in f: print(line.replace('a', 'b')) 不管在处理文件过程中是否发生异常,都能保证 with 语句执行完毕后 ...
- yy
sudo rm -rf /var/cache/apt/archives/python-catkin-pkg-modules_0.4.12-1_all.deb sudo rm -rf /var/cach ...
- cmake入门之内部构建
https://www.cnblogs.com/coderfenghc/tag/cmake/ https://cmake.org/cmake/help/v3.16/guide/tutorial/ind ...
- avalon里面倒计时功能2
// 转格式 timeStamp: function (second_time) { var time = parseInt(second_time) + "秒"; ) { ; ) ...
- MyBatis中in 的使用方法
在MyBatis中使用in关键字参数为集合时,需要使用到foreach标签. 下面详细介绍以下foreach标签的几个参数 foreach属性.png 实例: <select id=" ...