mirror of https://github.com/qt/qt3d.git
Removed unneeded QFrameGraph imports in examples
Change-Id: Ic5d1f04b365e43389b88862890b1d137c4f50ef9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
6f815a4fa5
commit
807a25d745
|
|
@ -55,7 +55,6 @@
|
|||
#include <Qt3DCore/QEntity>
|
||||
#include <Qt3DCore/QAspectEngine>
|
||||
#include <Qt3DInput/QInputAspect>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QSceneLoader>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@
|
|||
#include <Qt3DCore/qaspectengine.h>
|
||||
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DRender/qframegraph.h>
|
||||
#include <Qt3DRender/qforwardrenderer.h>
|
||||
|
||||
#include "qt3dwindow.h"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@
|
|||
#include <Qt3DCore/qaspectengine.h>
|
||||
#include <Qt3DInput/QInputAspect>
|
||||
#include <Qt3DRender/QParameter>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QCameraSelector>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@
|
|||
#include <Qt3DRender/qtechniquefilter.h>
|
||||
#include <Qt3DRender/qviewport.h>
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DRender/qframegraph.h>
|
||||
#include <Qt3DRender/qclearbuffer.h>
|
||||
#include "qt3dwindow.h"
|
||||
#include "qfirstpersoncameracontroller.h"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@
|
|||
|
||||
#include <Qt3DRender/QRenderStateSet>
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DRender/QPerVertexColorMaterial>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@
|
|||
#include <Qt3DRender/qtexture.h>
|
||||
#include <Qt3DRender/qrenderpass.h>
|
||||
#include <Qt3DRender/qrenderaspect.h>
|
||||
#include <Qt3DRender/qframegraph.h>
|
||||
#include <Qt3DRender/qforwardrenderer.h>
|
||||
|
||||
#include <Qt3DCore/qentity.h>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
#include <Qt3DCore/QEntity>
|
||||
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QMaterial>
|
||||
#include <Qt3DRender/QSphereMesh>
|
||||
#include <Qt3DRender/QPlaneMesh>
|
||||
|
|
|
|||
|
|
@ -7,10 +7,8 @@ QT += 3dcore 3drender 3dinput
|
|||
SOURCES += \
|
||||
main.cpp \
|
||||
examplescene.cpp \
|
||||
forwardrenderer.cpp \
|
||||
boxentity.cpp
|
||||
|
||||
HEADERS += \
|
||||
examplescene.h \
|
||||
forwardrenderer.h \
|
||||
boxentity.h
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt3D module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "forwardrenderer.h"
|
||||
|
||||
ForwardRenderer::ForwardRenderer(Qt3DCore::QNode *parent)
|
||||
: Qt3DRender::QFrameGraph(parent)
|
||||
, m_viewport(new Qt3DRender::QViewport())
|
||||
, m_cameraSelector(new Qt3DRender::QCameraSelector())
|
||||
, m_clearBuffer(new Qt3DRender::QClearBuffer())
|
||||
{
|
||||
m_viewport->setNormalizedRect(QRectF(0.0f, 0.0f, 1.0f, 1.0f));
|
||||
m_viewport->setClearColor(Qt::white);
|
||||
m_clearBuffer->setBuffers(Qt3DRender::QClearBuffer::ColorDepthBuffer);
|
||||
m_cameraSelector->setParent(m_viewport);
|
||||
m_clearBuffer->setParent(m_cameraSelector);
|
||||
setActiveFrameGraph(m_viewport);
|
||||
}
|
||||
|
||||
void ForwardRenderer::setCamera(Qt3DCore::QEntity *camera)
|
||||
{
|
||||
m_cameraSelector->setCamera(camera);
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt3D module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef FORWARDRENDERER_H
|
||||
#define FORWARDRENDERER_H
|
||||
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QViewport>
|
||||
#include <Qt3DRender/QCameraSelector>
|
||||
#include <Qt3DRender/QClearBuffer>
|
||||
|
||||
class ForwardRenderer : public Qt3DRender::QFrameGraph
|
||||
{
|
||||
public:
|
||||
ForwardRenderer(Qt3DCore::QNode *parent);
|
||||
|
||||
void setCamera(Qt3DCore::QEntity *camera);
|
||||
|
||||
private:
|
||||
Qt3DRender::QViewport *m_viewport;
|
||||
Qt3DRender::QCameraSelector *m_cameraSelector;
|
||||
Qt3DRender::QClearBuffer *m_clearBuffer;
|
||||
};
|
||||
|
||||
#endif // FORWARDRENDERER_H
|
||||
|
|
@ -56,10 +56,8 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
|
||||
#include "forwardrenderer.h"
|
||||
#include "examplescene.h"
|
||||
#include "qt3dwindow.h"
|
||||
#include "qfirstpersoncameracontroller.h"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@
|
|||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DRender/QDiffuseMapMaterial>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QTextureImage>
|
||||
|
||||
#include "planeentity.h"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
#include <Qt3DInput/QInputAspect>
|
||||
|
||||
#include <Qt3DRender/QRenderAspect>
|
||||
#include <Qt3DRender/QFrameGraph>
|
||||
#include <Qt3DRender/QForwardRenderer>
|
||||
#include <Qt3DRender/QPhongMaterial>
|
||||
#include <Qt3DRender/QCylinderMesh>
|
||||
|
|
|
|||
Loading…
Reference in New Issue