diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-01-16 11:27:41 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-01-18 15:31:12 +0100 |
commit | efeff9987d5191031231335573610d9ae34173da (patch) | |
tree | 45a09ff1e8251de31751d0f931f2d2b27682b6fe /examples/deferred-renderer-cpp/main.cpp | |
parent | d1409531fd29eec8f04da80aa62f5823e22bce11 (diff) |
deferred-renderer-cpp: Use ShaderData to fill lights for GL2 Technique
To test OpenGL2: comment addTechnique(m_gl3Technique); in finaleffect.cpp
Note: also fixed the FrameGraph tree, the draw screen quad was executed first
and then the fill GBUffer, it still worked as the screen quad reused the
GBuffer from the previous frame.
Change-Id: I52c0c11017e057a5042804ad49ccd1a3baf1d857
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/deferred-renderer-cpp/main.cpp')
-rw-r--r-- | examples/deferred-renderer-cpp/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/deferred-renderer-cpp/main.cpp b/examples/deferred-renderer-cpp/main.cpp index be8a48add..4fc7c24b3 100644 --- a/examples/deferred-renderer-cpp/main.cpp +++ b/examples/deferred-renderer-cpp/main.cpp @@ -186,7 +186,8 @@ int main(int ac, char **av) lightsData->addLight(light2); lightsData->addLight(light3); - screenQuadMaterial->addParameter(new Qt3D::QParameter(QStringLiteral("PointLightBlock"), QVariant::fromValue(lightsData))); + finalEffect->gl3Technique()->addParameter(new Qt3D::QParameter(QStringLiteral("PointLightBlock"), QVariant::fromValue(lightsData))); + finalEffect->gl2Technique()->addParameter(new Qt3D::QParameter(QStringLiteral("pointLights"), QVariant::fromValue(lightsData))); screenQuadMaterial->setEffect(finalEffect); Qt3D::QRotateTransform *screenPlaneRotation = new Qt3D::QRotateTransform(); |