Ogre Version: : 13 6 5
Operating System: :Linux Tumbleweed:
Render System: :OpenGL3+
I created a flatpak/flathub package which one can install with
Code: Select all
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 :
Code: Select all
#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 ?