diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-10-16 17:44:37 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-10-18 13:50:25 +0200 |
commit | b46d416987a4f62a3bcc6e4038e6b949c5b9af4b (patch) | |
tree | 341874d8340051786bb1223de5d63c8f84ba7405 /examples/tessellation-modes/TessellatedWireframeEffect.qml | |
parent | 16749ae5dbab2caa67d816a6778cdfd92e9510ac (diff) |
QShaderProgram: remove source file properties, replace by helper method
Only the source code QByteArray properties remain. The user is still able to
load a shader from a source file by using the shaderFromSource helper method
and assigning what it returns to one of the QByteArray source code properties.
Change-Id: I5246498fa680ec74d095d7a45f0b1bce239efc13
Task-number: QTBUG-41536
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/tessellation-modes/TessellatedWireframeEffect.qml')
-rw-r--r-- | examples/tessellation-modes/TessellatedWireframeEffect.qml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/tessellation-modes/TessellatedWireframeEffect.qml b/examples/tessellation-modes/TessellatedWireframeEffect.qml index 7feaa66e9..731fe3917 100644 --- a/examples/tessellation-modes/TessellatedWireframeEffect.qml +++ b/examples/tessellation-modes/TessellatedWireframeEffect.qml @@ -54,11 +54,12 @@ Effect { // It's expected that users of this will specify the tessellation control and evaluation // shaders and if necessary suitable replacements for the other stages - property alias vertexShaderSourceFile: program.vertexShaderSourceFile - property alias tessellationControlShaderSourceFile: program.tessellationControlShaderSourceFile - property alias tessellationEvaluationShaderSourceFile: program.tessellationEvaluationShaderSourceFile - property alias geometryShaderSourceFile: program.geometryShaderSourceFile - property alias fragmentShaderSourceFile: program.fragmentShaderSourceFile + property alias vertexShaderCode: program.vertexShaderCode + property alias tessellationControlShaderCode: program.tessellationControlShaderCode + property alias tessellationEvaluationShaderCode: program.tessellationEvaluationShaderCode + property alias geometryShaderCode: program.geometryShaderCode + property alias fragmentShaderCode: program.fragmentShaderCode + property alias shaderProgram: program parameters: [ Parameter { name: "ambient"; value: Qt.vector3d( 0.1, 0.1, 0.1 ) }, @@ -101,9 +102,9 @@ Effect { shaderProgram: ShaderProgram { id: program - vertexShaderSourceFile: ":/shaders/passthru.vert" - geometryShaderSourceFile: ":/shaders/robustwireframe.geom" - fragmentShaderSourceFile: ":/shaders/phongwireframe.frag" + vertexShaderCode: loadSource("qrc:/shaders/passthru.vert") + geometryShaderCode: loadSource("qrc:/shaders/robustwireframe.geom") + fragmentShaderCode: loadSource("qrc:/shaders/phongwireframe.frag") } } ] |