Close bld/OSG floor: OSG 3.4.1 from source + port osgQt to Qt6 + wire BgViewer dtEntity
Migrate BuildingViewer (16 files: DDS members, m_logger inits, QOpenGLWidget); gui:3:bld.info + gui:3:bdv now load
This commit is contained in:
17 files changed
+360
-219
No files matched your search
+2
-1
@@ -125,7 +125,8 @@ class Shot
|
||||
Shot(const int32_t id, const osg::Vec3d& shooterPos, const osg::Vec3d& targetPos, int buildingIdSrc,
|
||||
int rommNumberSrc, int buildingIdDst, int rommNumberDst, int lineType, const osg::Vec4& color,
|
||||
unsigned int duration_s, unsigned int durationMax_s, double simTimeCreated)
|
||||
: mId(id), mShooterPos(shooterPos), mTargetPos(targetPos), mBuildingIdSrc(buildingIdSrc),
|
||||
: m_logger(BuildingViewer::getLogger("Shot")), mId(id), mShooterPos(shooterPos),
|
||||
mTargetPos(targetPos), mBuildingIdSrc(buildingIdSrc),
|
||||
mRoomNumberSrc(rommNumberSrc), mBuildingIdDst(buildingIdDst), mRoomNumberDst(rommNumberDst),
|
||||
mLineType(lineType), mColor(color), mDuration_s(duration_s), m_DurationMax_s(durationMax_s),
|
||||
mSimTimeCreated(simTimeCreated)
|
||||
|
||||
+1
@@ -180,6 +180,7 @@ CtrlImpl::CtrlImpl(dtEntity::EntityManager &em, QWidget *parentWidget)
|
||||
, mPaused(false)
|
||||
, mNonRealtimeMode(false)
|
||||
, mFrameRate(30)
|
||||
, m_logger(BuildingViewer::getLogger("CtrlImpl"))
|
||||
{
|
||||
if (!mEntityManager->GetES(mMapSystem) ||
|
||||
!mEntityManager->GetES(mPlayerSystem))
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QtCore/QEvent>
|
||||
#include <QGLWidget>
|
||||
#include <QtOpenGLWidgets/QOpenGLWidget>
|
||||
#include <QWindow>
|
||||
#include <dtEntity/log.h>
|
||||
|
||||
@@ -176,7 +176,7 @@ void ViewWidget::viewModeChanged()
|
||||
|
||||
bool ViewWidget::isOpenGlWindowExposed() const
|
||||
{
|
||||
QGLWidget *gl = qobject_cast<QGLWidget*>(m_pView);
|
||||
QOpenGLWidget *gl = qobject_cast<QOpenGLWidget*>(m_pView);
|
||||
if (!gl || !gl->windowHandle())
|
||||
return false;
|
||||
return gl->windowHandle()->isExposed();
|
||||
|
||||
+4
-4
@@ -4,7 +4,6 @@
|
||||
#include <osg/Material>
|
||||
#include <osg/BlendFunc>
|
||||
#include <osg/BlendColor>
|
||||
#include <QStringRef>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
namespace VCtrl
|
||||
@@ -87,10 +86,11 @@ void SplitVisitor::apply(osg::Group &node)
|
||||
for (unsigned int i = 0; i < node.getNumDescriptions(); ++i)
|
||||
{
|
||||
QString descr = QString::fromStdString(node.getDescription(i));
|
||||
const QVector<QStringRef> descprt = descr.splitRef(QLatin1Char(';'));
|
||||
for (const QStringRef &prt : descprt)
|
||||
// Qt6: QStringRef removed; split()/splitRef() both return QVector<QString>
|
||||
const QVector<QString> descprt = descr.split(QLatin1Char(';'));
|
||||
for (const QString &prt : descprt)
|
||||
{
|
||||
const QVector<QStringRef> items = prt.split(QLatin1Char('='));
|
||||
const QVector<QString> items = prt.split(QLatin1Char('='));
|
||||
if (items.size() == 2 && items[0] == QLatin1String("base_height"))
|
||||
h = items[1].toFloat();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user