summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRobert Brock <robert.brock@kdab.com>2016-05-09 11:09:38 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-05-15 13:44:44 +0000
commit2ed452167ef143147137f134639be53bf065112a (patch)
treee7c9d6abad0f5667ebe22fd72212a1d11284c786 /examples
parent101408edf1ca81c3d627b7d454090c54dd1edceb (diff)
Moved deferred-renderer-qml example to manual test
Part of an examples cleanup Change-Id: If2fe4646b5a57269516f615b0c6d5097723fdb2e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qt3d/deferred-renderer-qml/DeferredRenderer.qml103
-rw-r--r--examples/qt3d/deferred-renderer-qml/FinalEffect.qml191
-rw-r--r--examples/qt3d/deferred-renderer-qml/GBuffer.qml136
-rw-r--r--examples/qt3d/deferred-renderer-qml/SceneEffect.qml156
-rw-r--r--examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.pro21
-rw-r--r--examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.qrc9
-rw-r--r--examples/qt3d/deferred-renderer-qml/doc/src/deferred-renderer-qml.qdoc32
-rw-r--r--examples/qt3d/deferred-renderer-qml/main.cpp63
-rw-r--r--examples/qt3d/deferred-renderer-qml/main.qml253
-rw-r--r--examples/qt3d/qt3d.pro1
10 files changed, 0 insertions, 965 deletions
diff --git a/examples/qt3d/deferred-renderer-qml/DeferredRenderer.qml b/examples/qt3d/deferred-renderer-qml/DeferredRenderer.qml
deleted file mode 100644
index 6f70d2d87..000000000
--- a/examples/qt3d/deferred-renderer-qml/DeferredRenderer.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 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$
-**
-****************************************************************************/
-
-import Qt3D.Core 2.0
-import Qt3D.Render 2.0
-
-Viewport {
- id: root
- normalizedRect : Qt.rect(0.0, 0.0, 1.0, 1.0)
-
- property alias gBuffer : gBufferTargetSelector.target
- property alias camera : sceneCameraSelector.camera
-
- readonly property Layer sceneLayer: Layer {}
- readonly property Layer screenQuadLayer: Layer {}
-
- RenderSurfaceSelector {
- LayerFilter {
- layers : root.sceneLayer
-
- RenderTargetSelector {
- id : gBufferTargetSelector
-
- ClearBuffers {
- buffers: ClearBuffers.ColorDepthBuffer
-
- RenderPassFilter {
- id : geometryPass
- matchAny : FilterKey { name : "pass"; value : "geometry" }
-
- CameraSelector {
- id : sceneCameraSelector
- }
- }
- }
- }
- }
-
- LayerFilter {
- layers : root.screenQuadLayer
-
- ClearBuffers {
- buffers: ClearBuffers.ColorDepthBuffer
-
- RenderPassFilter {
- id : finalPass
- matchAny : FilterKey { name : "pass"; value : "final" }
- CameraSelector {
- camera: sceneCameraSelector.camera
- }
- }
-
- }
- }
- }
-}
diff --git a/examples/qt3d/deferred-renderer-qml/FinalEffect.qml b/examples/qt3d/deferred-renderer-qml/FinalEffect.qml
deleted file mode 100644
index 482ad91cc..000000000
--- a/examples/qt3d/deferred-renderer-qml/FinalEffect.qml
+++ /dev/null
@@ -1,191 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 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$
-**
-****************************************************************************/
-
-import Qt3D.Core 2.0
-import Qt3D.Render 2.0
-
-Effect {
- techniques : [
- // OpenGL 3.1
- Technique {
- graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.CoreProfile; minorVersion : 1; majorVersion : 3 }
- parameters: Parameter { name: "PointLightBlock"; value: ShaderData {
- property ShaderDataArray lights: ShaderDataArray {
- // hard coded lights until we have a way to filter
- // ShaderData in a scene
- values: [sceneEntity.light, sphere1.light, sphere2.light, light3.light, light4.light]
- }
- }
- }
- renderPasses : RenderPass {
- filterKeys : FilterKey { name : "pass"; value : "final" }
- shaderProgram : ShaderProgram {
- id : finalShaderGL3
- vertexShaderCode:
- "#version 140
-
- in vec4 vertexPosition;
- uniform mat4 modelMatrix;
-
- void main()
- {
- gl_Position = modelMatrix * vertexPosition;
- }
- "
- fragmentShaderCode:
- "#version 140
-
- uniform sampler2D color;
- uniform sampler2D position;
- uniform sampler2D normal;
- uniform vec2 winSize;
-
- out vec4 fragColor;
-
- struct PointLight
- {
- vec3 position;
- vec3 direction;
- vec4 color;
- float intensity;
- };
-
- const int lightCount = 5;
- uniform PointLightBlock {
- PointLight lights[lightCount];
- };
-
- void main()
- {
- vec2 texCoord = gl_FragCoord.xy / winSize;
- vec4 col = texture(color, texCoord);
- vec3 pos = texture(position, texCoord).xyz;
- vec3 norm = texture(normal, texCoord).xyz;
-
- vec4 lightColor;
- for (int i = 0; i < lightCount; i++) {
- vec3 s = normalize(lights[i].position - pos);
- lightColor += lights[i].color * (lights[i].intensity * max(dot(s, norm), 0.0));
- }
- lightColor /= float(lightCount);
- fragColor = col;
- }
- "
- }
- }
- },
- // OpenGL 2.0 with FBO extension
- Technique {
- graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.NoProfile; minorVersion : 0; majorVersion : 2 }
- parameters: Parameter { name: "pointLights"; value: ShaderData {
- property ShaderDataArray lights: ShaderDataArray {
- // hard coded lights until we have a way to filter
- // ShaderData in a scene
- values: [sceneEntity.light, sphere1.light, sphere2.light, light3.light, light4.light]
- }
- }
- }
- renderPasses : RenderPass {
- filterKeys : FilterKey { name : "pass"; value : "final" }
- shaderProgram : ShaderProgram {
- id : finalShaderGL2
- vertexShaderCode:
- "#version 110
-
- attribute vec4 vertexPosition;
- uniform mat4 modelMatrix;
-
- void main()
- {
- gl_Position = modelMatrix * vertexPosition;
- }
- "
- fragmentShaderCode:
- "#version 110
-
- uniform sampler2D color;
- uniform sampler2D position;
- uniform sampler2D normal;
- uniform vec2 winSize;
-
- struct PointLight
- {
- vec3 position;
- vec3 direction;
- vec4 color;
- float intensity;
- };
-
- const int lightCount = 5;
- uniform struct
- {
- PointLight lights[lightCount];
- };
-
- void main()
- {
- vec2 texCoord = gl_FragCoord.xy / winSize;
- vec4 col = texture2D(color, texCoord);
- vec3 pos = texture2D(position, texCoord).xyz;
- vec3 norm = texture2D(normal, texCoord).xyz;
-
- vec4 lightColor;
- for (int i = 0; i < lightCount; i++) {
- vec3 s = lights[i].position - pos);
- lightColor += lights[i].color * (lights[i].intensity * max(dot(s, norm), 0.0));
- }
- lightColor /= float(lightCount);
- gl_FragColor = col * lightColor;
- }
- "
- }
- }
- }]
-}
diff --git a/examples/qt3d/deferred-renderer-qml/GBuffer.qml b/examples/qt3d/deferred-renderer-qml/GBuffer.qml
deleted file mode 100644
index bf43c66b5..000000000
--- a/examples/qt3d/deferred-renderer-qml/GBuffer.qml
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 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$
-**
-****************************************************************************/
-
-import Qt3D.Core 2.0
-import Qt3D.Render 2.0
-
-RenderTarget {
-
- property alias color : colorAttachment
- property alias position : positionAttachment
- property alias normal : normalAttachment
- property alias depth : depthAttachment
-
- attachments : [
-
- RenderTargetOutput {
- objectName : "color"
- attachmentPoint : RenderTargetOutput.Color0
- texture : Texture2D {
- id : colorAttachment
- width : 1024
- height : 1024
- format : Texture.RGBA32F
- generateMipMaps : false
- magnificationFilter : Texture.Linear
- minificationFilter : Texture.Linear
- wrapMode {
- x: WrapMode.ClampToEdge
- y: WrapMode.ClampToEdge
- }
- }
- },
- RenderTargetOutput {
- objectName : "position"
- attachmentPoint : RenderTargetOutput.Color1
- texture : Texture2D {
- id : positionAttachment
- width : 1024
- height : 1024
- // This texture format may not be supported by
- // some OpenGL vendors when used as a color attachment
- format : Texture.RGB32F
- generateMipMaps : false
- magnificationFilter : Texture.Linear
- minificationFilter : Texture.Linear
- wrapMode {
- x: WrapMode.ClampToEdge
- y: WrapMode.ClampToEdge
- }
- }
- },
- RenderTargetOutput {
- objectName : "normal"
- attachmentPoint : RenderTargetOutput.Color2
- texture : Texture2D {
- id : normalAttachment
- width : 1024
- height : 1024
- // This texture format may not be supported by
- // some OpenGL vendors when used as a color attachment
- format : Texture.RGB16F
- generateMipMaps : false
- magnificationFilter : Texture.Linear
- minificationFilter : Texture.Linear
- wrapMode {
- x: WrapMode.ClampToEdge
- y: WrapMode.ClampToEdge
- }
- }
- },
- RenderTargetOutput {
- objectName : "depth"
- attachmentPoint : RenderTargetOutput.Depth
- texture : Texture2D {
- id : depthAttachment
- width : 1024
- height : 1024
- format : Texture.D32F
- generateMipMaps : false
- magnificationFilter : Texture.Linear
- minificationFilter : Texture.Linear
- wrapMode {
- x: WrapMode.ClampToEdge
- y: WrapMode.ClampToEdge
- }
- }
- }
- ] // outputs
-}
diff --git a/examples/qt3d/deferred-renderer-qml/SceneEffect.qml b/examples/qt3d/deferred-renderer-qml/SceneEffect.qml
deleted file mode 100644
index 5dbfdae63..000000000
--- a/examples/qt3d/deferred-renderer-qml/SceneEffect.qml
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 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$
-**
-****************************************************************************/
-
-import Qt3D.Core 2.0
-import Qt3D.Render 2.0
-
-Effect {
- id : sceneMaterialEffect
- techniques : [
- // OpenGL 3.1
- Technique {
- graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.CoreProfile; minorVersion : 1; majorVersion : 3 }
- renderPasses : RenderPass {
- filterKeys : FilterKey { name : "pass"; value : "geometry" }
- shaderProgram : ShaderProgram {
- id : sceneShaderGL3
- vertexShaderCode:
- "#version 140
-
- in vec4 vertexPosition;
- in vec3 vertexNormal;
-
- out vec4 color0;
- out vec3 position0;
- out vec3 normal0;
-
- uniform mat4 mvp;
- uniform mat4 modelView;
- uniform mat3 modelViewNormal;
- uniform vec4 meshColor;
-
- void main()
- {
- color0 = meshColor;
- position0 = vec3(modelView * vertexPosition);
- normal0 = normalize(modelViewNormal * vertexNormal);
- gl_Position = mvp * vertexPosition;
- }
- "
- fragmentShaderCode:
- "#version 140
-
- in vec4 color0;
- in vec3 position0;
- in vec3 normal0;
-
- out vec4 color;
- out vec3 position;
- out vec3 normal;
-
- void main()
- {
- color = color0;
- position = position0;
- normal = normal0;
- }
- "
- }
- }
- },
- // OpenGL 2.0
- Technique {
- graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.CoreProfile; minorVersion : 0; majorVersion : 2 }
- renderPasses : RenderPass {
- filterKeys : FilterKey { name : "pass"; value : "geometry" }
- shaderProgram : ShaderProgram {
- id : sceneShaderGL2
- vertexShaderCode:
- "#version 110
-
- attribute vec4 vertexPosition;
- attribute vec3 vertexNormal;
-
- varying vec4 color0;
- varying vec3 position0;
- varying vec3 normal0;
-
- uniform mat4 mvp;
- uniform mat4 modelView;
- uniform mat3 modelViewNormal;
- uniform vec4 meshColor;
-
- void main()
- {
- color0 = meshColor;
- position0 = vec3(modelView * vertexPosition);
- normal0 = normalize(modelViewNormal * vertexNormal);
- gl_Position = mvp * vertexPosition;
- }
- "
- fragmentShaderCode:
- "#version 110
-
- varying vec4 color0;
- varying vec3 position0;
- varying vec3 normal0;
-
- void main()
- {
- gl_FragData[0] = color0;
- gl_FragData[1] = vec4(position0, 0);
- gl_FragData[2] = vec4(normal0, 0);
- }
- "
- }
- }
- }
- ]
-}
diff --git a/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.pro b/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.pro
deleted file mode 100644
index 40b2f555c..000000000
--- a/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += 3dcore 3drender 3dinput 3dquick qml quick 3dquickextras
-
-HEADERS += \
-
-
-OTHER_FILES += \
- main.qml \
- DeferredRenderer.qml \
- FinalEffect.qml \
- SceneEffect.qml \
- GBuffer.qml
-
-RESOURCES += \
- deferred-renderer-qml.qrc
-
-SOURCES += \
- main.cpp
diff --git a/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.qrc b/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.qrc
deleted file mode 100644
index 573b2337e..000000000
--- a/examples/qt3d/deferred-renderer-qml/deferred-renderer-qml.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>DeferredRenderer.qml</file>
- <file>FinalEffect.qml</file>
- <file>SceneEffect.qml</file>
- <file>GBuffer.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qt3d/deferred-renderer-qml/doc/src/deferred-renderer-qml.qdoc b/examples/qt3d/deferred-renderer-qml/doc/src/deferred-renderer-qml.qdoc
deleted file mode 100644
index 61c7cbd13..000000000
--- a/examples/qt3d/deferred-renderer-qml/doc/src/deferred-renderer-qml.qdoc
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example deferred-renderer-qml
- \title Qt 3D: Deferred Renderer QML Example
- \ingroup qt3d-examples-qml
-*/
diff --git a/examples/qt3d/deferred-renderer-qml/main.cpp b/examples/qt3d/deferred-renderer-qml/main.cpp
deleted file mode 100644
index 55bbe91ee..000000000
--- a/examples/qt3d/deferred-renderer-qml/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-
-/****************************************************************************
-**
-** Copyright (C) 2014 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 <Qt3DQuickExtras/qt3dquickwindow.h>
-#include <QGuiApplication>
-
-int main(int argc, char* argv[])
-{
- QGuiApplication app(argc, argv);
- Qt3DExtras::Quick::Qt3DQuickWindow view;
- view.setSource(QUrl("qrc:/main.qml"));
- view.show();
-
- return app.exec();
-}
diff --git a/examples/qt3d/deferred-renderer-qml/main.qml b/examples/qt3d/deferred-renderer-qml/main.qml
deleted file mode 100644
index b56e0bd5d..000000000
--- a/examples/qt3d/deferred-renderer-qml/main.qml
+++ /dev/null
@@ -1,253 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 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$
-**
-****************************************************************************/
-
-import QtQuick 2.0 as QQ2
-import Qt3D.Core 2.0
-import Qt3D.Render 2.0
-import Qt3D.Input 2.0
-import Qt3D.Extras 2.0
-
-Entity {
- id : root
-
- GBuffer {
- id : gBuffer
- }
-
- components : [
- RenderSettings {
- activeFrameGraph: DeferredRenderer {
- id: frameGraph
- camera : camera
- gBuffer: gBuffer
- }
-
- renderPolicy: RenderSettings.Always
- },
- InputSettings {}
- ]
-
- FirstPersonCameraController { camera: camera }
-
- Entity {
- id : screenQuadEntity
- PlaneMesh {
- id: mesh
- width: 2.0
- height: 2.0
- meshResolution: Qt.size(2, 2)
- }
-
- Transform { // We rotate the plane so that it faces us
- id: transform
- rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 90)
- }
-
- Material {
- id: material
- parameters : [
- Parameter { name: "color"; value : gBuffer.color },
- Parameter { name: "position"; value : gBuffer.position },
- Parameter { name: "normal"; value : gBuffer.normal },
- Parameter { name: "winSize"; value : Qt.size(1024, 1024) }
- ]
- effect : FinalEffect {}
- }
-
- components : [ frameGraph.screenQuadLayer, mesh, transform, material ]
- }
-
- Entity {
- id : sceneEntity
-
- property PointLight light: PointLight {
- color : "white"
- intensity : 4.0
- QQ2.ColorAnimation on color { from: "white"; to: "blue"; duration: 4000; loops: 2 }
- QQ2.NumberAnimation on intensity { from: 0; to: 5.0; duration: 1000; loops: QQ2.Animation.Infinite }
- }
-
- components: [ sceneEntity.light ]
-
- Camera {
- id: camera
- projectionType: CameraLens.PerspectiveProjection
- fieldOfView: 45
- aspectRatio: 16/9
- nearPlane : 0.01
- farPlane : 1000.0
- position: Qt.vector3d( 0.0, 0.0, -25.0 )
- upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
- viewCenter: Qt.vector3d( 0.0, 0.0, 10.0 )
- }
-
- SphereMesh {
- id : sphereMesh
- rings: 50
- slices: 100
- }
-
- SceneEffect {
- id : sceneMaterialEffect
- }
-
- Entity {
- id : sphere1
-
- property Material material : Material {
- effect : sceneMaterialEffect
- parameters : Parameter { name : "meshColor"; value : "dodgerblue" }
- }
-
- property Transform transform: Transform {
- id: sphere1Transform
- property real x: -10.0
- translation: Qt.vector3d(x, 0, 5)
- }
-
- QQ2.SequentialAnimation {
- loops: QQ2.Animation.Infinite
- running: false
- QQ2.NumberAnimation { target: sphere1Transform; property: "x"; to: 6; duration: 2000 }
- QQ2.NumberAnimation { target: sphere1Transform; property: "x"; to: -10; duration: 2000 }
- }
-
- property PointLight light : PointLight {
- color : "green"
- intensity : 5.0
- }
-
- components : [
- sphereMesh,
- material,
- sphere1.transform,
- sphere1.light,
- frameGraph.sceneLayer
- ]
- }
-
- Entity {
- id : sphere2
-
- property Material material : Material {
- effect : sceneMaterialEffect
- parameters : Parameter { name : "meshColor"; value : "green" }
- }
-
- property PointLight light : PointLight {
- color : "orange"
- intensity : 2.0
- }
-
- property Transform transform: Transform {
- translation: Qt.vector3d(5, 0, 5)
- }
-
- components : [
- sphereMesh,
- sphere2.transform,
- material,
- sphere2.light,
- frameGraph.sceneLayer
- ]
- }
-
- Entity {
- id: light3
- property PointLight light : PointLight {
- color : "white"
- intensity : 2.0
- }
-
- property Material material : Material {
- effect : sceneMaterialEffect
- parameters : Parameter { name : "meshColor"; value : "red" }
- }
-
- property Transform transform: Transform {
- id: light3Transform
- property real y: 2.0
- translation: Qt.vector3d(2, y, 7)
- }
-
- QQ2.SequentialAnimation {
- loops: QQ2.Animation.Infinite
- running: true
- QQ2.NumberAnimation { target: light3Transform; property: "y"; to: 6; duration: 1000; easing.type: QQ2.Easing.InOutQuad }
- QQ2.NumberAnimation { target: light3Transform; property: "y"; to: -6; duration: 1000; easing.type: QQ2.Easing.InOutQuint }
- }
-
- components: [
- sphereMesh,
- material,
- light,
- transform,
- frameGraph.sceneLayer
- ]
- }
-
- Entity {
- id: light4
- property PointLight light : PointLight {
- color : "white"
- intensity : 3.0
- }
- property Transform transform: Transform {
- translation: Qt.vector3d(5, 2, 7)
- }
-
- components: [
- light4.light,
- light4.transform,
- frameGraph.sceneLayer
- ]
- }
- }
-}
diff --git a/examples/qt3d/qt3d.pro b/examples/qt3d/qt3d.pro
index 451855e00..596b9497f 100644
--- a/examples/qt3d/qt3d.pro
+++ b/examples/qt3d/qt3d.pro
@@ -7,7 +7,6 @@ SUBDIRS += \
multiviewport \
wireframe \
tessellation-modes \
- deferred-renderer-qml \
shadow-map-qml \
materials \
keyboardinput-qml \