Debian Codegraph @

tests/manual/qtbug-76766/Material1.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: RenderPass {
44 filterKeys: [
45 FilterKey {
46 name: "pass"
47 value: 0
48 }
49 ]
50 shaderProgram: gl3Shader
51 }
52 }
53 ]
54 }
55 }
56
57