Debian Codegraph @

tests/manual/qtbug-76766/Material2.qml

raw
1 // Copyright (C) 2019 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import Qt3D.Core 2.0
5 import Qt3D.Render 2.0
6
7 Material {
8 id: root
9
10 property color color: Qt.rgba(0.15, 0.35, 0.50, 1.0)
11
12 parameters: [
13 Parameter { name: "color"; value: Qt.vector3d(root.color.r, root.color.g, root.color.b) }
14 ]
15
16
17 effect: Effect {
18 property string vertex: "qrc:/shaders/shader.vert"
19 property string fragment: "qrc:/shaders/shader.frag"
20
21 FilterKey {
22 id: forward
23 name: "renderingStyle"
24 value: "forward"
25 }
26
27 ShaderProgram {
28 id: gl3Shader
29 vertexShaderCode: loadSource(parent.vertex)
30 fragmentShaderCode: loadSource(parent.fragment)
31 }
32
33 techniques: [
34 // OpenGL 3.1
35 Technique {
36 filterKeys: [ forward ]
37 graphicsApiFilter {
38 api: GraphicsApiFilter.OpenGL
39 profile: GraphicsApiFilter.CoreProfile
40 majorVersion: 3
41 minorVersion: 3
42 }
43 renderPasses: [
44 RenderPass {
45 filterKeys: [
46 FilterKey {
47 name: "pass"
48 value: 1
49 }
50 ]
51 shaderProgram: gl3Shader
52 renderStates: [
53 NoDepthMask {},
54 BlendEquation {},
55 BlendEquationArguments {
56 sourceRgb: BlendEquationArguments.One
57 destinationRgb: BlendEquationArguments.One
58 sourceAlpha: BlendEquationArguments.Zero
59 destinationAlpha: BlendEquationArguments.One
60 }
61 ]
62 }
63 ]
64 }
65 ]
66 }
67 }
68
69