Too strict opengl glsl language compiler in flathub bundle

Ogre Version: : 13 6 5
Operating System: :Linux Tumbleweed:
Render System: :OpenGL3+

I created a flatpak/flathub package which one can install with

flatpak install --user https://dl.flathub.org/build-repo/136650/io.github.tomluchowski.OpenDungeonsPlus.flatpakref

After regular OpenSuse Tumbleweed distro update, with newer kernel modules for video drivers I run my game with :
flatpak run io.github.tomluchowski.OpenDungeonsPlus

and I get errors like that :
Program ‘myKoboldVertexShader’ is not supported: ‘Creature.vert’ 0:9(1): error: #extension directive is not allowed in the middle of a shader
Error: ScriptCompiler - invalid parameters in Kobold.material(10): Named constants have not been initialised, perhaps a compile error
Error: ScriptCompiler - invalid parameters in Kobold.material(11): Named constants have not been initialised, perhaps a compile error
Error: ScriptCompiler - invalid parameters in Kobold.material(12): Named constants have not been initialised, perhaps a compile error
Error: ScriptCompiler - invalid parameters in Kobold.material(13): Named constants have not been initialised, perhaps a compile error

The same is on the other machine, with nouveau drivers. Does This GLSL script compiler come system wide or is it bundled with flatpak package ?
My graphic card is GeForce GTX 1070, and the driver version : 550.120
Uhh I know that package managers like flatpak and snapcraft are very sensible towards drivers and opengl libraries…Is there anything we could do to repair this error ? Why some time the script compilation passes fine and sometimes it fails ? Which software is involved in this process ? What I could do to make my game immune to such errors ? Notice :


```
#version 330 core
#extension GL_ARB_explicit_uniform_location : enable
#extension GL_ARB_shading_language_include : enable

uniform    mat4 projectionMatrix;
uniform    mat4 viewMatrix;
uniform    mat4 worldMatrix;
uniform    mat4 lightMatrix;
layout (location = 0) in vec4 position;
layout (location = 2)  in vec3 normal;
layout (location = 14) in vec3 tangent;
 
layout (location = 8) in vec2 uv0;
layout (location = 8) in vec2 uv1;
out vec2 out_UV0;
out vec2 out_UV1;
out vec3 FragPos;
out vec4 VertexPos; 

out mat3 TBN;
 
 
void main() {
    // compute world space position, tangent, bitangent
    vec3 P = (worldMatrix * position).xyz;
    vec3 T = normalize(vec3(worldMatrix * vec4(tangent, 0.0)));
    vec3 B = normalize(vec3(worldMatrix * vec4(cross(tangent, normal), 0.0))); 
    vec3 N = cross(B, T);
    TBN = mat3(T, B, N);
 
    gl_Position = projectionMatrix * viewMatrix * vec4(P, 1.0);
    FragPos = P;
 
    out_UV0 = uv0;
    out_UV1 = uv1;
    VertexPos = lightMatrix * position;
}
```

version needs to be before extension right ? So how this error could be avoided at all ?
Maybe it is worth mentioning that on the main machine with GeForce GTX 1070 and Nvidia drivers from the standard repo the game BUILDED with GNU make run with ‘./opendungeons-plus’ bells and whistles and rise no errors.

Now the chatgpt claims :
"
Use system libraries: If possible, configure the Flatpak to use system OpenGL drivers instead of the bundled ones. This can be done by modifying the Flatpak manifest or passing environment variables during runtime."
Question is how do I do that ?

you did try a flatpak repair?

I have just tried ‘flatpak repair’. It was upgrading a few package SDK, but the game throws the same errors and looks as it looked before – that is without proper pixel and vertex shaders…

That’s a roller-coaster : after upgrading the flatpak bundles – so called runtimes — with 'flatpak upgrade" everything works as desired. Many thanks for attention !

This topic was automatically closed after 2 days. New replies are no longer allowed.