Search code examples
pythonglslpanda3d

GLSL error trying to run python code


I'm trying to run this code: https://github.com/wezu/p3d_wave (demo1.py) and I'm getting next error:

: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

Solution

  • It says GLSL version 1.40 is not supported. So change the version in the vertex and the fragment shaders to a supported one: 1.10, 1.20, 1.30, 1.00 or 3.00.

    So if you open let's say the v.glsl file the second line is: #version 140, change this to let's say: #version 130

    Do this for all the shaders, the ones which ends with .glsl.