ShaderProgramBuilder QML Type
根据加载的图形生成着色器程序内容。更多
Import Statement: | import Qt3D.Render 2.9 |
In C++: | QShaderProgramBuilder |
Status: | Deprecated |
属性
- computeShaderCode : string
- enabledLayers : stringlist
- fragmentShaderCode : string
- geometryShaderCode : string
- shaderProgram : string
- tessellationControlShaderCode : string
- tessellationEvaluationShaderCode : string
- vertexShaderCode : string
详细说明
着色器程序生成器由多个不同的着色器图形组成,用于生成着色器代码。
生成的着色器代码有一个缓存。生成的着色器默认保存在QStandardPaths::writableLocation(QStandardPaths::TempLocation)) 中。可通过将环境变量 QT3D_WRITABLE_CACHE_PATH 设置为有效的可写路径来覆盖该路径。
可以通过设置环境变量 QT3D_DISABLE_SHADER_CACHE 来禁用缓存。
在大多数情况下,对图形所做的更改会被Qt 3D 检测到,并生成新的缓存条目。当图形中包含的代码片段发生更改时,这种情况就不会发生。要解决这个问题,可以通过清除缓存目录或设置环境变量 QT3D_REBUILD_SHADER_CACHE 来强制重新生成着色器代码。
属性文档
computeShaderCode : string |
保存生成的计算着色器代码
enabledLayers : stringlist |
保存代码生成过程中将在着色器图形上激活的图层列表。
fragmentShaderCode : string |
保存生成的片段着色器代码
geometryShaderCode : string |
保存生成的几何着色器代码
shaderProgram : string |
保存此生成器生成代码的着色器程序。
tessellationControlShaderCode : string |
保存生成的细分控制着色器代码
tessellationEvaluationShaderCode : string |
保存生成的细分评估着色器代码
vertexShaderCode : string |
保存生成的顶点着色器代码
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.