尝试运行 python 代码时出现 GLSL 错误



我正在尝试运行此代码: https://github.com/wezu/p3d_wave (demo1.py(我收到下一个错误:

:display:gsg:glgsg(error): An error occurred while compiling GLSL vertex shader v.glsl:
v.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL fragment shader make_wave2_f.glsl:
make_wave2_f.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL vertex shader water_v.glsl:
water_v.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL fragment shader water_f.glsl:
water_f.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL vertex shader v.glsl:
v.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL fragment shader make_wave_f.glsl:
make_wave_f.glsl:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

它说不支持 GLSL 版本 1.40。因此,将顶点和片段着色器中的版本更改为受支持的版本:1.10、1.20、1.30、1.00 或 3.00。

因此,如果您打开 v.glsl 文件,则第二行是:#version 140,将其更改为:#version 130

对所有着色器执行此操作,即以 .glsl 结尾的着色器。

相关内容

  • 没有找到相关文章

最新更新