2012-07-23 09:19:24 +02:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "osgearth.h"
|
|
|
|
|
|
|
|
#include <QtCore/qfileinfo.h>
|
2012-07-29 14:15:24 +02:00
|
|
|
#include <QtCore/qthread.h>
|
2012-07-23 09:19:24 +02:00
|
|
|
#include <QtDeclarative/qdeclarative.h>
|
|
|
|
#include <QtDeclarative/qdeclarativeview.h>
|
|
|
|
#include <QtDeclarative/qdeclarativeengine.h>
|
2013-09-15 23:06:25 +02:00
|
|
|
#include <qpainter.h>
|
|
|
|
#include <qvector3d.h>
|
2012-07-23 09:19:24 +02:00
|
|
|
#include <QtOpenGL/qglframebufferobject.h>
|
|
|
|
|
|
|
|
#include <osg/MatrixTransform>
|
|
|
|
#include <osg/AutoTransform>
|
|
|
|
#include <osg/Camera>
|
|
|
|
#include <osg/TexMat>
|
|
|
|
#include <osg/TextureRectangle>
|
|
|
|
#include <osg/Texture2D>
|
|
|
|
#include <osgViewer/ViewerEventHandlers>
|
|
|
|
#include <osgDB/ReadFile>
|
|
|
|
#include <osgEarthUtil/EarthManipulator>
|
|
|
|
#include <osgEarthUtil/ObjectPlacer>
|
|
|
|
#include <osgEarth/Map>
|
|
|
|
|
|
|
|
#include <QtCore/qtimer.h>
|
|
|
|
|
2012-07-29 04:17:10 +02:00
|
|
|
#include "utils/pathutils.h"
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
OsgEarthItem::OsgEarthItem(QDeclarativeItem *parent) :
|
2012-07-23 09:19:24 +02:00
|
|
|
QDeclarativeItem(parent),
|
2012-07-29 14:15:24 +02:00
|
|
|
m_renderer(0),
|
|
|
|
m_rendererThread(0),
|
2012-07-23 09:19:24 +02:00
|
|
|
m_currentSize(640, 480),
|
|
|
|
m_roll(0.0),
|
|
|
|
m_pitch(0.0),
|
|
|
|
m_yaw(0.0),
|
|
|
|
m_latitude(-28.5),
|
|
|
|
m_longitude(153.0),
|
|
|
|
m_altitude(400.0),
|
|
|
|
m_fieldOfView(90.0),
|
2012-07-29 14:15:24 +02:00
|
|
|
m_sceneFile(QLatin1String("/usr/share/osgearth/maps/srtm.earth"))
|
2012-07-23 09:19:24 +02:00
|
|
|
{
|
|
|
|
setSize(m_currentSize);
|
|
|
|
setFlag(ItemHasNoContents, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
OsgEarthItem::~OsgEarthItem()
|
|
|
|
{
|
2012-07-29 14:15:24 +02:00
|
|
|
if (m_renderer) {
|
|
|
|
m_rendererThread->exit();
|
2013-05-19 16:37:30 +02:00
|
|
|
// wait up to 10 seconds for renderer thread to exit
|
|
|
|
m_rendererThread->wait(10 * 1000);
|
2012-07-29 14:15:24 +02:00
|
|
|
|
|
|
|
delete m_renderer;
|
|
|
|
delete m_rendererThread;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QString OsgEarthItem::resolvedSceneFile() const
|
|
|
|
{
|
|
|
|
QString sceneFile = m_sceneFile;
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// try to resolve the relative scene file name:
|
2012-07-29 14:15:24 +02:00
|
|
|
if (!QFileInfo(sceneFile).exists()) {
|
2013-05-19 16:37:30 +02:00
|
|
|
QDeclarativeView *view = qobject_cast<QDeclarativeView *>(scene()->views().first());
|
2012-07-29 14:15:24 +02:00
|
|
|
|
|
|
|
if (view) {
|
|
|
|
QUrl baseUrl = view->engine()->baseUrl();
|
|
|
|
sceneFile = baseUrl.resolved(sceneFile).toLocalFile();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return sceneFile;
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
|
|
|
|
{
|
|
|
|
Q_UNUSED(oldGeometry);
|
|
|
|
Q_UNUSED(newGeometry);
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// Dynamic gyometry changes are not supported yet,
|
|
|
|
// terrain is rendered to fixed geompetry and scalled for now
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
/*
|
2013-05-19 16:37:30 +02:00
|
|
|
qDebug() << Q_FUNC_INFO << newGeometry;
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
int w = qRound(newGeometry.width());
|
|
|
|
int h = qRound(newGeometry.height());
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
if (m_currentSize != QSize(w,h) && m_gw.get()) {
|
2012-07-23 09:19:24 +02:00
|
|
|
m_currentSize = QSize(w,h);
|
|
|
|
|
|
|
|
m_gw->getEventQueue()->windowResize(0,0,w,h);
|
|
|
|
m_gw->resized(0,0,w,h);
|
|
|
|
|
|
|
|
osg::Camera *camera = m_viewer->getCamera();
|
|
|
|
camera->setViewport(new osg::Viewport(0,0,w,h));
|
|
|
|
camera->setProjectionMatrixAsPerspective(m_fieldOfView, qreal(w)/h, 1.0f, 10000.0f);
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
|
|
|
*/
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *style, QWidget *widget)
|
|
|
|
{
|
|
|
|
Q_UNUSED(painter);
|
|
|
|
Q_UNUSED(style);
|
2013-05-19 16:37:30 +02:00
|
|
|
QGLWidget *glWidget = qobject_cast<QGLWidget *>(widget);
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
if (!m_renderer) {
|
|
|
|
m_renderer = new OsgEarthItemRenderer(this, glWidget);
|
|
|
|
connect(m_renderer, SIGNAL(frameReady()),
|
|
|
|
this, SLOT(updateView()), Qt::QueuedConnection);
|
|
|
|
|
|
|
|
m_rendererThread = new QThread(this);
|
|
|
|
m_renderer->moveToThread(m_rendererThread);
|
|
|
|
m_rendererThread->start();
|
|
|
|
|
|
|
|
QMetaObject::invokeMethod(m_renderer, "initScene", Qt::QueuedConnection);
|
|
|
|
return;
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
QGLFramebufferObject *fbo = m_renderer->lastFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
if (glWidget && fbo) {
|
2012-07-29 14:15:24 +02:00
|
|
|
glWidget->drawTexture(boundingRect(), fbo->texture());
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
void OsgEarthItem::updateView()
|
2012-07-23 09:19:24 +02:00
|
|
|
{
|
2012-07-29 14:15:24 +02:00
|
|
|
update();
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
void OsgEarthItem::updateFrame()
|
2012-07-23 09:19:24 +02:00
|
|
|
{
|
2012-07-29 14:15:24 +02:00
|
|
|
if (m_renderer) {
|
|
|
|
m_renderer->markDirty();
|
|
|
|
QMetaObject::invokeMethod(m_renderer, "updateFrame", Qt::QueuedConnection);
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setRoll(qreal arg)
|
|
|
|
{
|
|
|
|
if (!qFuzzyCompare(m_roll, arg)) {
|
|
|
|
m_roll = arg;
|
2012-07-29 14:15:24 +02:00
|
|
|
updateFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
emit rollChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setPitch(qreal arg)
|
|
|
|
{
|
|
|
|
if (!qFuzzyCompare(m_pitch, arg)) {
|
|
|
|
m_pitch = arg;
|
2012-07-29 14:15:24 +02:00
|
|
|
updateFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
emit pitchChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setYaw(qreal arg)
|
|
|
|
{
|
|
|
|
if (!qFuzzyCompare(m_yaw, arg)) {
|
|
|
|
m_yaw = arg;
|
2012-07-29 14:15:24 +02:00
|
|
|
updateFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
emit yawChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setLatitude(double arg)
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
// not sure qFuzzyCompare is accurate enough for geo coordinates
|
2012-07-23 09:19:24 +02:00
|
|
|
if (m_latitude != arg) {
|
|
|
|
m_latitude = arg;
|
|
|
|
emit latitudeChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setLongitude(double arg)
|
|
|
|
{
|
|
|
|
if (m_longitude != arg) {
|
|
|
|
m_longitude = arg;
|
|
|
|
emit longitudeChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setAltitude(double arg)
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
if (!qFuzzyCompare(m_altitude, arg)) {
|
2012-07-23 09:19:24 +02:00
|
|
|
m_altitude = arg;
|
|
|
|
emit altitudeChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// ! Camera vertical field of view in degrees
|
2012-07-23 09:19:24 +02:00
|
|
|
void OsgEarthItem::setFieldOfView(qreal arg)
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
if (!qFuzzyCompare(m_fieldOfView, arg)) {
|
2012-07-23 09:19:24 +02:00
|
|
|
m_fieldOfView = arg;
|
|
|
|
emit fieldOfViewChanged(arg);
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// it should be a queued call to OsgEarthItemRenderer instead
|
2012-07-29 14:15:24 +02:00
|
|
|
/*if (m_viewer.get()) {
|
2012-07-23 09:19:24 +02:00
|
|
|
m_viewer->getCamera()->setProjectionMatrixAsPerspective(
|
|
|
|
m_fieldOfView,
|
|
|
|
qreal(m_currentSize.width())/m_currentSize.height(),
|
|
|
|
1.0f, 10000.0f);
|
2013-05-19 16:37:30 +02:00
|
|
|
}*/
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
updateFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void OsgEarthItem::setSceneFile(QString arg)
|
|
|
|
{
|
|
|
|
if (m_sceneFile != arg) {
|
|
|
|
m_sceneFile = arg;
|
|
|
|
emit sceneFileChanged(arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
OsgEarthItemRenderer::OsgEarthItemRenderer(OsgEarthItem *item, QGLWidget *glWidget) :
|
|
|
|
QObject(0),
|
|
|
|
m_item(item),
|
|
|
|
m_lastFboNumber(0),
|
|
|
|
m_currentSize(640, 480),
|
|
|
|
m_cameraDirty(false)
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
// make a shared gl widget to avoid
|
|
|
|
// osg rendering to mess with qpainter state
|
|
|
|
// this runs in the main thread
|
2012-07-29 14:15:24 +02:00
|
|
|
m_glWidget = new QGLWidget(0, glWidget);
|
|
|
|
m_glWidget.data()->setAttribute(Qt::WA_PaintOutsidePaintEvent);
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
for (int i = 0; i < FboCount; i++) {
|
2012-07-29 14:15:24 +02:00
|
|
|
m_fbo[i] = new QGLFramebufferObject(m_currentSize, QGLFramebufferObject::CombinedDepthStencil);
|
|
|
|
QPainter p(m_fbo[i]);
|
2013-05-19 16:37:30 +02:00
|
|
|
p.fillRect(0, 0, m_currentSize.width(), m_currentSize.height(), Qt::gray);
|
2012-07-29 14:15:24 +02:00
|
|
|
}
|
|
|
|
}
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
OsgEarthItemRenderer::~OsgEarthItemRenderer()
|
2012-07-23 09:19:24 +02:00
|
|
|
{
|
2012-07-29 14:15:24 +02:00
|
|
|
m_glWidget.data()->makeCurrent();
|
2013-05-19 16:37:30 +02:00
|
|
|
for (int i = 0; i < FboCount; i++) {
|
2012-07-29 14:15:24 +02:00
|
|
|
delete m_fbo[i];
|
|
|
|
m_fbo[i] = 0;
|
|
|
|
}
|
|
|
|
m_glWidget.data()->doneCurrent();
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
delete m_glWidget.data();
|
|
|
|
}
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
QGLFramebufferObject *OsgEarthItemRenderer::lastFrame()
|
|
|
|
{
|
|
|
|
return m_fbo[m_lastFboNumber];
|
|
|
|
}
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
void OsgEarthItemRenderer::initScene()
|
|
|
|
{
|
|
|
|
Q_ASSERT(!m_viewer.get());
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
int w = m_currentSize.width();
|
|
|
|
int h = m_currentSize.height();
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
QString sceneFile = m_item->resolvedSceneFile();
|
2012-07-23 09:19:24 +02:00
|
|
|
m_model = osgDB::readNodeFile(sceneFile.toStdString());
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// setup caching
|
2012-07-29 04:17:10 +02:00
|
|
|
osgEarth::MapNode *mapNode = osgEarth::MapNode::findMapNode(m_model.get());
|
2012-09-25 20:19:18 +02:00
|
|
|
if (!mapNode) {
|
2012-07-29 04:17:10 +02:00
|
|
|
qWarning() << Q_FUNC_INFO << sceneFile << " doesn't look like an osgEarth file";
|
|
|
|
}
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
m_gw = new osgViewer::GraphicsWindowEmbedded(0, 0, w, h);
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
m_viewer = new osgViewer::Viewer();
|
|
|
|
m_viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
|
|
|
|
m_viewer->setSceneData(m_model);
|
|
|
|
m_viewer->getDatabasePager()->setDoPreCompile(true);
|
|
|
|
|
|
|
|
osg::Camera *camera = m_viewer->getCamera();
|
2013-05-19 16:37:30 +02:00
|
|
|
camera->setViewport(new osg::Viewport(0, 0, w, h));
|
2012-07-23 09:19:24 +02:00
|
|
|
camera->setGraphicsContext(m_gw);
|
2013-05-19 16:37:30 +02:00
|
|
|
camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
// configure the near/far so we don't clip things that are up close
|
|
|
|
camera->setNearFarRatio(0.00002);
|
2013-05-19 16:37:30 +02:00
|
|
|
camera->setProjectionMatrixAsPerspective(m_item->fieldOfView(), qreal(w) / h, 1.0f, 10000.0f);
|
2012-07-23 09:19:24 +02:00
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
updateFrame();
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-07-29 14:15:24 +02:00
|
|
|
void OsgEarthItemRenderer::updateFrame()
|
|
|
|
{
|
2013-05-19 16:37:30 +02:00
|
|
|
if (!m_cameraDirty || !m_viewer.get() || m_glWidget.isNull()) {
|
2012-07-29 14:15:24 +02:00
|
|
|
return;
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2012-07-29 14:15:24 +02:00
|
|
|
|
|
|
|
m_glWidget.data()->makeCurrent();
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// To find a camera view matrix, find placer matrixes for two points
|
|
|
|
// onr at requested coords and another latitude shifted by 0.01 deg
|
2012-07-29 14:15:24 +02:00
|
|
|
osgEarth::Util::ObjectPlacer placer(m_viewer->getSceneData());
|
|
|
|
|
|
|
|
m_cameraDirty = false;
|
|
|
|
|
|
|
|
osg::Matrixd positionMatrix;
|
|
|
|
placer.createPlacerMatrix(m_item->latitude(), m_item->longitude(), m_item->altitude(), positionMatrix);
|
|
|
|
osg::Matrixd positionMatrix2;
|
2013-05-19 16:37:30 +02:00
|
|
|
placer.createPlacerMatrix(m_item->latitude() + 0.01, m_item->longitude(), m_item->altitude(), positionMatrix2);
|
2012-07-29 14:15:24 +02:00
|
|
|
|
|
|
|
osg::Vec3d eye(0.0f, 0.0f, 0.0f);
|
|
|
|
osg::Vec3d viewVector(0.0f, 0.0f, 0.0f);
|
|
|
|
osg::Vec3d upVector(0.0f, 0.0f, 1.0f);
|
|
|
|
|
|
|
|
eye = positionMatrix.preMult(eye);
|
2013-05-19 16:37:30 +02:00
|
|
|
upVector = positionMatrix.preMult(upVector);
|
2012-07-29 14:15:24 +02:00
|
|
|
upVector.normalize();
|
2013-05-19 16:37:30 +02:00
|
|
|
viewVector = positionMatrix2.preMult(viewVector) - eye;
|
2012-07-29 14:15:24 +02:00
|
|
|
viewVector.normalize();
|
|
|
|
viewVector *= 10.0;
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// TODO: clarify the correct rotation order,
|
|
|
|
// currently assuming yaw, pitch, roll
|
2012-07-29 14:15:24 +02:00
|
|
|
osg::Quat q;
|
2013-05-19 16:37:30 +02:00
|
|
|
q.makeRotate(-m_item->yaw() * M_PI / 180.0, upVector);
|
|
|
|
upVector = q * upVector;
|
2012-07-29 14:15:24 +02:00
|
|
|
viewVector = q * viewVector;
|
|
|
|
|
|
|
|
osg::Vec3d side = viewVector ^ upVector;
|
2013-05-19 16:37:30 +02:00
|
|
|
q.makeRotate(m_item->pitch() * M_PI / 180.0, side);
|
|
|
|
upVector = q * upVector;
|
2012-07-29 14:15:24 +02:00
|
|
|
viewVector = q * viewVector;
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
q.makeRotate(m_item->roll() * M_PI / 180.0, viewVector);
|
|
|
|
upVector = q * upVector;
|
2012-07-29 14:15:24 +02:00
|
|
|
viewVector = q * viewVector;
|
|
|
|
|
|
|
|
osg::Vec3d center = eye + viewVector;
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// qDebug() << "e " << eye.x() << eye.y() << eye.z();
|
|
|
|
// qDebug() << "c " << center.x() << center.y() << center.z();
|
|
|
|
// qDebug() << "up" << upVector.x() << upVector.y() << upVector.z();
|
2012-07-29 14:15:24 +02:00
|
|
|
|
|
|
|
m_viewer->getCamera()->setViewMatrixAsLookAt(osg::Vec3d(eye.x(), eye.y(), eye.z()),
|
|
|
|
osg::Vec3d(center.x(), center.y(), center.z()),
|
|
|
|
osg::Vec3d(upVector.x(), upVector.y(), upVector.z()));
|
|
|
|
|
|
|
|
{
|
|
|
|
QGLFramebufferObject *fbo = m_fbo[(m_lastFboNumber + 1) % FboCount];
|
|
|
|
QPainter fboPainter(fbo);
|
|
|
|
fboPainter.beginNativePainting();
|
|
|
|
m_viewer->frame();
|
|
|
|
fboPainter.endNativePainting();
|
|
|
|
}
|
|
|
|
m_glWidget.data()->doneCurrent();
|
|
|
|
|
|
|
|
m_lastFboNumber = (m_lastFboNumber + 1) % FboCount;
|
|
|
|
|
|
|
|
emit frameReady();
|
|
|
|
}
|