Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 5.0.0-rc1
-
None
Description
The GLSL file wizard offers only generating of Desktop OpenGL fragment/vertex shaders:
attribute vec4 qt_Vertex; attribute vec4 qt_MultiTexCoord0; uniform mat4 qt_ModelViewProjectionMatrix; varying vec4 qt_TexCoord0; void main(void) { gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex; qt_TexCoord0 = qt_MultiTexCoord0; }
Using that in a Qt 6-based project, will not work, because Qt 6 requires Vulkan style GLSL. Compilation with Qt's qsb tool https://doc.qt.io/qt-6/qtshadertools-qsb.html will fail:
QSpirvCompiler: Failed to parse shader Shader baking failed: ERROR: #version: ES shaders for SPIR-V require version 310 or higher ERROR: xyz/bindingloops_qt6.vert:1: 'attribute' : Reserved word. ERROR: xyz/bindingloops_qt6.vert:1: 'attribute' : no longer supported in es profile; removed in version 300 ERROR: xyz/bindingloops_qt6.vert:1: '' : compilation terminated ERROR: 4 compilation errors. No code generated.
We should simply add a new file wizard with the right GLSL style and point out in each description which Qt version it is compatible with.
Attachments
Issue Links
- depends on
-
QTCREATORBUG-26057 GLSL editor does not support Vulkan style GLSL (which is required for Qt 6)
- Reported