2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
|
2024-02-23 14:41:04 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2016-06-01 14:53:47 +00:00
|
|
|
|
|
|
|
import Qt3D.Core 2.0
|
|
|
|
import Qt3D.Render 2.0
|
|
|
|
import Qt3D.Extras 2.0
|
|
|
|
|
|
|
|
Entity {
|
|
|
|
readonly property Layer layer: debugLayer
|
|
|
|
|
|
|
|
components : [
|
|
|
|
Layer { id: debugLayer },
|
|
|
|
|
2020-07-30 11:03:46 +00:00
|
|
|
PlaneMesh {
|
|
|
|
width: 2.0
|
|
|
|
height: 2.0
|
|
|
|
meshResolution: Qt.size(2, 2)
|
2016-06-01 14:53:47 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
Transform { // We rotate the plane so that it faces us
|
|
|
|
rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 90)
|
|
|
|
},
|
|
|
|
|
|
|
|
Material {
|
|
|
|
effect : Effect {
|
|
|
|
techniques: [
|
|
|
|
Technique {
|
|
|
|
graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.NoProfile; minorVersion : 0; majorVersion : 2 }
|
|
|
|
renderPasses: RenderPass {
|
|
|
|
filterKeys: FilterKey { name: "pass"; value: "final" }
|
|
|
|
shaderProgram: ShaderProgram {
|
2016-08-10 07:00:27 +00:00
|
|
|
vertexShaderCode: loadSource("qrc:/debug_es2.vert")
|
|
|
|
fragmentShaderCode: loadSource("qrc:/debug_es2.frag")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
Technique {
|
|
|
|
graphicsApiFilter {api : GraphicsApiFilter.OpenGL; profile : GraphicsApiFilter.CoreProfile; minorVersion : 2; majorVersion : 3 }
|
|
|
|
renderPasses: RenderPass {
|
|
|
|
filterKeys: FilterKey { name: "pass"; value: "final" }
|
|
|
|
shaderProgram: ShaderProgram {
|
|
|
|
vertexShaderCode: loadSource("qrc:/debug_gl3.vert")
|
|
|
|
fragmentShaderCode: loadSource("qrc:/debug_gl3.frag")
|
2016-06-01 14:53:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|