"vtkXOpenGLRenderWindow (0x7fffd7237640): Could not find a decent config"

I have installed VTK version 8.2 on my WSL1 Ubuntu 20.04.2. I’m running particle tracking simulations, where the final track and geometry should be displayed by the VTK package at the end of the simulation. But instead I get the following error message:

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 296
vtkXOpenGLRenderWindow (0x7fffd7237640): Could not find a decent config

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 296
vtkXOpenGLRenderWindow (0x7fffd7237640): Could not find a decent config

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 296
vtkXOpenGLRenderWindow (0x7fffd7237640): Could not find a decent config

[KSVISUALIZATION NORMAL MESSAGE] vtk track painter found 1 tracks
[KSVISUALIZATION NORMAL MESSAGE] vtk track painter <track_painter> is writing <1> cells to file </home/cstrid/Kassiopeia/install/output/Kassiopeia/track_painter.vtp>
[KSVISUALIZATION NORMAL MESSAGE] vtk track terminator painter <terminator_painter> is writing <1> cells to file </home/cstrid/Kassiopeia/install/output/Kassiopeia/terminator_painter.vtp>
[GEOVIS NORMAL MESSAGE] vtk geometry painter <geometry_painter> is writing <1008> cells to file </home/cstrid/Kassiopeia/install/output/Kassiopeia/DipoleTrapGeometry.vtp>
ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 461
vtkShaderProgram (0x7fffd885f960): 1: #version 140
2: #ifdef GL_ES
3: #ifdef GL_FRAGMENT_PRECISION_HIGH
4: precision highp float;
5: precision highp sampler2D;
6: precision highp sampler3D;
7: #else
8: precision mediump float;
9: precision mediump sampler2D;
10: precision mediump sampler3D;
11: #endif
12: #define texelFetchBuffer texelFetch
13: #define texture1D texture
14: #define texture2D texture
15: #define texture3D texture
16: #else // GL_ES
17: #define highp
18: #define mediump
19: #define lowp
20: #if VERSION == 150
21: #define texelFetchBuffer texelFetch
22: #define texture1D texture
23: #define texture2D texture
24: #define texture3D texture
25: #endif
26: #endif // GL_ES
27: #define varying in
28:
29:
30: /=========================================================================
31:
32: Program: Visualization Toolkit
33: Module: vtkPolyDataFS.glsl
34:
35: Copyright © Ken Martin, Will Schroeder, Bill Lorensen
36: All rights reserved.
37: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
38:
39: This software is distributed WITHOUT ANY WARRANTY; without even
40: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
41: PURPOSE. See the above copyright notice for more information.
42:
43: =========================================================================
/
44: // Template for the polydata mappers fragment shader
45:
46: uniform int PrimitiveIDOffset;
47:
48: // VC position of this fragment
49: //VTK::PositionVC::Dec
50:
51: // Camera prop
52: uniform int cameraParallel;
53:
54:
55: // optional color passed in from the vertex shader, vertexColor
56: uniform float ambientIntensity; // the material ambient
57: uniform float diffuseIntensity; // the material diffuse
58: uniform float opacityUniform; // the fragment opacity
59: uniform vec3 ambientColorUniform; // ambient color
60: uniform vec3 diffuseColorUniform; // diffuse color
61: uniform samplerBuffer textureC;
62:
63:
64: // optional surface normal declaration
65: //VTK::Normal::Dec
66:
67: // extra lighting parameters
68: uniform vec3 lightColor0;
69: uniform vec3 lightDirectionVC0; // normalized
70: uniform vec3 lightColor1;
71: uniform vec3 lightDirectionVC1; // normalized
72: uniform vec3 lightColor2;
73: uniform vec3 lightDirectionVC2; // normalized
74: uniform vec3 lightColor3;
75: uniform vec3 lightDirectionVC3; // normalized
76: uniform vec3 lightColor4;
77: uniform vec3 lightDirectionVC4; // normalized
78:
79:
80: // Texture maps
81: //VTK::TMap::Dec
82:
83: // Texture coordinates
84: //VTK::TCoord::Dec
85:
86: // picking support
87: //VTK::Picking::Dec
88:
89: // Depth Peeling Support
90: //VTK::DepthPeeling::Dec
91:
92: // clipping plane vars
93: //VTK::Clip::Dec
94:
95: // the output of this shader
96: out vec4 fragOutput0;
97:
98:
99: // Apple Bug
100: //VTK::PrimID::Dec
101:
102: // handle coincident offsets
103: //VTK::Coincident::Dec
104:
105: // Value raster
106: //VTK::ValuePass::Dec
107:
108: void main()
109: {
110: // VC position of this fragment. This should not branch/return/discard.
111: //VTK::PositionVC::Impl
112:
113: // Place any calls that require uniform flow (e.g. dFdx) here.
114: //VTK::UniformFlow::Impl
115:
116: // Set gl_FragDepth here (gl_FragCoord.z by default)
117: //VTK::Depth::Impl
118:
119: // Early depth peeling abort:
120: //VTK::DepthPeeling::PreColor
121:
122: // Apple Bug
123: //VTK::PrimID::Impl
124:
125: //VTK::Clip::Impl
126:
127: //VTK::ValuePass::Impl
128:
129: vec4 texColor = texelFetchBuffer(textureC, gl_PrimitiveID + PrimitiveIDOffset);
130: vec3 ambientColor = ambientIntensity * texColor.rgb;
131: vec3 diffuseColor = diffuseIntensity * texColor.rgb;
132: float opacity = opacityUniform * texColor.a;
133:
134: // Generate the normal if we are not passed in one
135: //VTK::Normal::Impl
136:
137: fragOutput0 = vec4(ambientColor + diffuseColor, opacity);
138: //VTK::Light::Impl
139:
140:
141: //VTK::TCoord::Impl
142:
143: if (fragOutput0.a <= 0.0)
144: {
145: discard;
146: }
147:
148: //VTK::DepthPeeling::Impl
149:
150: //VTK::Picking::Impl
151:
152: // handle coincident offsets
153: //VTK::Coincident::Impl
154: }

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 462
vtkShaderProgram (0x7fffd885f960): 0:129(45): error: gl_PrimitiveID' undeclared 0:129(45): error: operands to arithmetic operators must be numeric 0:129(18): error: no function with name 'texelFetchBuffer' 0:130(41): warning: texColor’ used uninitialized
0:131(41): warning: texColor' used uninitialized 0:132(35): warning: texColor’ used uninitialized

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 1991
vtkTextureObject (0x7fffd8b2e6e0): failed at glCopyTexImage2D 36012 1 OpenGL errors detected
0 : (1282) Invalid operation

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 461
vtkShaderProgram (0x7fffd9646be0): 1: #version 140
2: #ifdef GL_ES
3: #ifdef GL_FRAGMENT_PRECISION_HIGH
4: precision highp float;
5: precision highp sampler2D;
6: precision highp sampler3D;
7: #else
8: precision mediump float;
9: precision mediump sampler2D;
10: precision mediump sampler3D;
11: #endif
12: #define texelFetchBuffer texelFetch
13: #define texture1D texture
14: #define texture2D texture
15: #define texture3D texture
16: #else // GL_ES
17: #define highp
18: #define mediump
19: #define lowp
20: #if VERSION == 150
21: #define texelFetchBuffer texelFetch
22: #define texture1D texture
23: #define texture2D texture
24: #define texture3D texture
25: #endif
26: #endif // GL_ES
27: #define varying in
28:
29:
30: /=========================================================================
31:
32: Program: Visualization Toolkit
33: Module: vtkPolyDataFS.glsl
34:
35: Copyright © Ken Martin, Will Schroeder, Bill Lorensen
36: All rights reserved.
37: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
38:
39: This software is distributed WITHOUT ANY WARRANTY; without even
40: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
41: PURPOSE. See the above copyright notice for more information.
42:
43: =========================================================================
/
44: // Template for the polydata mappers fragment shader
45:
46: uniform int PrimitiveIDOffset;
47:
48: // VC position of this fragment
49: in vec4 vertexVCVSOutput;
50:
51: // Camera prop
52: uniform int cameraParallel;
53:
54:
55: // optional color passed in from the vertex shader, vertexColor
56: uniform float ambientIntensity; // the material ambient
57: uniform float diffuseIntensity; // the material diffuse
58: uniform float opacityUniform; // the fragment opacity
59: uniform vec3 ambientColorUniform; // ambient color
60: uniform vec3 diffuseColorUniform; // diffuse color
61: uniform float specularIntensity; // the material specular intensity
62: uniform vec3 specularColorUniform; // intensity weighted color
63: uniform float specularPowerUniform;
64: uniform samplerBuffer textureC;
65:
66:
67: // optional surface normal declaration
68: //VTK::Normal::Dec
69:
70: // extra lighting parameters
71: uniform vec3 lightColor0;
72: uniform vec3 lightDirectionVC0; // normalized
73: uniform vec3 lightColor1;
74: uniform vec3 lightDirectionVC1; // normalized
75: uniform vec3 lightColor2;
76: uniform vec3 lightDirectionVC2; // normalized
77: uniform vec3 lightColor3;
78: uniform vec3 lightDirectionVC3; // normalized
79: uniform vec3 lightColor4;
80: uniform vec3 lightDirectionVC4; // normalized
81:
82:
83: // Texture maps
84: //VTK::TMap::Dec
85:
86: // Texture coordinates
87: //VTK::TCoord::Dec
88:
89: // picking support
90: //VTK::Picking::Dec
91:
92: // Depth Peeling Support
93: uniform sampler2D opaqueDepth;
94:
95:
96: // clipping plane vars
97: //VTK::Clip::Dec
98:
99: // the output of this shader
100: out vec4 fragOutput0;
101: out vec4 fragOutput1;
102:
103:
104: // Apple Bug
105: //VTK::PrimID::Dec
106:
107: // handle coincident offsets
108: //VTK::Coincident::Dec
109:
110: // Value raster
111: //VTK::ValuePass::Dec
112:
113: void main()
114: {
115: // VC position of this fragment. This should not branch/return/discard.
116: vec4 vertexVC = vertexVCVSOutput;
117:
118: // Place any calls that require uniform flow (e.g. dFdx) here.
119: vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));
120: vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));
121: //VTK::UniformFlow::Impl
122:
123:
124: // Set gl_FragDepth here (gl_FragCoord.z by default)
125: gl_FragDepth = gl_FragCoord.z;
126:
127: // Early depth peeling abort:
128: ivec2 pixel = ivec2(gl_FragCoord.xy);
129: float oDepth = texelFetch(opaqueDepth, pixel, 0).y;
130: if (oDepth != -1. && gl_FragDepth > oDepth)
131: { // Ignore fragments that are occluded by opaque geometry:
132: fragOutput1.xy = vec2(-1., oDepth);
133: return;
134: }
135: else
136: {
137: fragOutput1.xy = vec2(-gl_FragDepth, gl_FragDepth);
138: return;
139: }
140:
141:
142: // Apple Bug
143: //VTK::PrimID::Impl
144:
145: //VTK::Clip::Impl
146:
147: //VTK::ValuePass::Impl
148:
149: vec3 specularColor = specularIntensity * specularColorUniform;
150: float specularPower = specularPowerUniform;
151: vec4 texColor = texelFetchBuffer(textureC, gl_PrimitiveID + PrimitiveIDOffset);
152: vec3 ambientColor = ambientIntensity * texColor.rgb;
153: vec3 diffuseColor = diffuseIntensity * texColor.rgb;
154: float opacity = opacityUniform * texColor.a;
155:
156: // Generate the normal if we are not passed in one
157: fdx = normalize(fdx);
158: fdy = normalize(fdy);
159: vec3 normalVCVSOutput = normalize(cross(fdx,fdy));
160: if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0normalVCVSOutput; }
161: if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0
normalVCVSOutput; }
162:
163: vec3 diffuse = vec3(0,0,0);
164: vec3 specular = vec3(0,0,0);
165: float df;
166: float sf;
167: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC0));
168: diffuse += (df * lightColor0);
169: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC0, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
170: specular += (sf * lightColor0);
171: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC1));
172: diffuse += (df * lightColor1);
173: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC1, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
174: specular += (sf * lightColor1);
175: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC2));
176: diffuse += (df * lightColor2);
177: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC2, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
178: specular += (sf * lightColor2);
179: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC3));
180: diffuse += (df * lightColor3);
181: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC3, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
182: specular += (sf * lightColor3);
183: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC4));
184: diffuse += (df * lightColor4);
185: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC4, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
186: specular += (sf * lightColor4);
187: diffuse = diffuse * diffuseColor;
188: specular = specular * specularColor;
189: fragOutput0 = vec4(ambientColor + diffuse + specular, opacity); //VTK::Light::Impl
190:
191: //VTK::TCoord::Impl
192:
193: if (fragOutput0.a <= 0.0)
194: {
195: discard;
196: }
197:
198: //VTK::DepthPeeling::Impl
199:
200: //VTK::Picking::Impl
201:
202: // handle coincident offsets
203: //VTK::Coincident::Impl
204: }

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 462
vtkShaderProgram (0x7fffd9646be0): 0:151(45): error: gl_PrimitiveID' undeclared 0:151(45): error: operands to arithmetic operators must be numeric 0:151(18): error: no function with name 'texelFetchBuffer' 0:152(41): warning: texColor’ used uninitialized
0:153(41): warning: texColor' used uninitialized 0:154(35): warning: texColor’ used uninitialized

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 461
vtkShaderProgram (0x7fffd965b5b0): 1: #version 140
2: #ifdef GL_ES
3: #ifdef GL_FRAGMENT_PRECISION_HIGH
4: precision highp float;
5: precision highp sampler2D;
6: precision highp sampler3D;
7: #else
8: precision mediump float;
9: precision mediump sampler2D;
10: precision mediump sampler3D;
11: #endif
12: #define texelFetchBuffer texelFetch
13: #define texture1D texture
14: #define texture2D texture
15: #define texture3D texture
16: #else // GL_ES
17: #define highp
18: #define mediump
19: #define lowp
20: #if VERSION == 150
21: #define texelFetchBuffer texelFetch
22: #define texture1D texture
23: #define texture2D texture
24: #define texture3D texture
25: #endif
26: #endif // GL_ES
27: #define varying in
28:
29:
30: /=========================================================================
31:
32: Program: Visualization Toolkit
33: Module: vtkPolyDataFS.glsl
34:
35: Copyright © Ken Martin, Will Schroeder, Bill Lorensen
36: All rights reserved.
37: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
38:
39: This software is distributed WITHOUT ANY WARRANTY; without even
40: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
41: PURPOSE. See the above copyright notice for more information.
42:
43: =========================================================================
/
44: // Template for the polydata mappers fragment shader
45:
46: uniform int PrimitiveIDOffset;
47:
48: // VC position of this fragment
49: in vec4 vertexVCVSOutput;
50:
51: // Camera prop
52: uniform int cameraParallel;
53:
54:
55: // optional color passed in from the vertex shader, vertexColor
56: uniform float ambientIntensity; // the material ambient
57: uniform float diffuseIntensity; // the material diffuse
58: uniform float opacityUniform; // the fragment opacity
59: uniform vec3 ambientColorUniform; // ambient color
60: uniform vec3 diffuseColorUniform; // diffuse color
61: uniform float specularIntensity; // the material specular intensity
62: uniform vec3 specularColorUniform; // intensity weighted color
63: uniform float specularPowerUniform;
64: uniform samplerBuffer textureC;
65:
66:
67: // optional surface normal declaration
68: //VTK::Normal::Dec
69:
70: // extra lighting parameters
71: uniform vec3 lightColor0;
72: uniform vec3 lightDirectionVC0; // normalized
73: uniform vec3 lightColor1;
74: uniform vec3 lightDirectionVC1; // normalized
75: uniform vec3 lightColor2;
76: uniform vec3 lightDirectionVC2; // normalized
77: uniform vec3 lightColor3;
78: uniform vec3 lightDirectionVC3; // normalized
79: uniform vec3 lightColor4;
80: uniform vec3 lightDirectionVC4; // normalized
81:
82:
83: // Texture maps
84: //VTK::TMap::Dec
85:
86: // Texture coordinates
87: //VTK::TCoord::Dec
88:
89: // picking support
90: //VTK::Picking::Dec
91:
92: // Depth Peeling Support
93: uniform sampler2D lastFrontPeel;
94: uniform sampler2D lastDepthPeel;
95:
96:
97: // clipping plane vars
98: //VTK::Clip::Dec
99:
100: // the output of this shader
101: out vec4 fragOutput0;
102: out vec4 fragOutput1;
103: out vec4 fragOutput2;
104:
105:
106: // Apple Bug
107: //VTK::PrimID::Dec
108:
109: // handle coincident offsets
110: //VTK::Coincident::Dec
111:
112: // Value raster
113: //VTK::ValuePass::Dec
114:
115: void main()
116: {
117: // VC position of this fragment. This should not branch/return/discard.
118: vec4 vertexVC = vertexVCVSOutput;
119:
120: // Place any calls that require uniform flow (e.g. dFdx) here.
121: vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));
122: vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));
123: //VTK::UniformFlow::Impl
124:
125:
126: // Set gl_FragDepth here (gl_FragCoord.z by default)
127: gl_FragDepth = gl_FragCoord.z;
128:
129: // Early depth peeling abort:
130: ivec2 pixelCoord = ivec2(gl_FragCoord.xy);
131: vec4 front = texelFetch(lastFrontPeel, pixelCoord, 0);
132: vec2 minMaxDepth = texelFetch(lastDepthPeel, pixelCoord, 0).xy;
133: float minDepth = -minMaxDepth.x;
134: float maxDepth = minMaxDepth.y;
135: // Use a tolerance when checking if we’re on a current peel.
136: // Some OSX drivers compute slightly different fragment depths
137: // from one pass to the next. This value was determined
138: // through trial-and-error – it may need to be increased at
139: // some point. See also the comment in vtkDepthPeelingPass’s
140: // shader.
141: float epsilon = 0.0000001;
142:
143: // Default outputs (no data/change):
144: fragOutput0 = vec4(0.);
145: fragOutput1 = front;
146: fragOutput2.xy = vec2(-1.);
147:
148: // Is this fragment outside the current peels?
149: if (gl_FragDepth < minDepth - epsilon ||
150: gl_FragDepth > maxDepth + epsilon)
151: {
152: return;
153: }
154:
155: // Is this fragment inside the current peels?
156: if (gl_FragDepth > minDepth + epsilon &&
157: gl_FragDepth < maxDepth - epsilon)
158: {
159: // Write out depth so this frag will be peeled later:
160: fragOutput2.xy = vec2(-gl_FragDepth, gl_FragDepth);
161: return;
162: }
163:
164: // Continue processing for fragments on the current peel:
165:
166:
167: // Apple Bug
168: //VTK::PrimID::Impl
169:
170: //VTK::Clip::Impl
171:
172: //VTK::ValuePass::Impl
173:
174: vec3 specularColor = specularIntensity * specularColorUniform;
175: float specularPower = specularPowerUniform;
176: vec4 texColor = texelFetchBuffer(textureC, gl_PrimitiveID + PrimitiveIDOffset);
177: vec3 ambientColor = ambientIntensity * texColor.rgb;
178: vec3 diffuseColor = diffuseIntensity * texColor.rgb;
179: float opacity = opacityUniform * texColor.a;
180:
181: // Generate the normal if we are not passed in one
182: fdx = normalize(fdx);
183: fdy = normalize(fdy);
184: vec3 normalVCVSOutput = normalize(cross(fdx,fdy));
185: if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0normalVCVSOutput; }
186: if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0
normalVCVSOutput; }
187:
188: vec3 diffuse = vec3(0,0,0);
189: vec3 specular = vec3(0,0,0);
190: float df;
191: float sf;
192: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC0));
193: diffuse += (df * lightColor0);
194: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC0, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
195: specular += (sf * lightColor0);
196: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC1));
197: diffuse += (df * lightColor1);
198: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC1, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
199: specular += (sf * lightColor1);
200: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC2));
201: diffuse += (df * lightColor2);
202: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC2, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
203: specular += (sf * lightColor2);
204: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC3));
205: diffuse += (df * lightColor3);
206: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC3, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
207: specular += (sf * lightColor3);
208: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC4));
209: diffuse += (df * lightColor4);
210: sf = sign(df)*pow(max(0.0, dot( reflect(lightDirectionVC4, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
211: specular += (sf * lightColor4);
212: diffuse = diffuse * diffuseColor;
213: specular = specular * specularColor;
214: fragOutput0 = vec4(ambientColor + diffuse + specular, opacity); //VTK::Light::Impl
215:
216: //VTK::TCoord::Impl
217:
218: if (fragOutput0.a <= 0.0)
219: {
220: discard;
221: }
222:
223: vec4 frag = fragOutput0;
224: // Default outputs (no data/change):
225:
226: // This fragment is on a current peel:
227: if (gl_FragDepth >= minDepth - epsilon &&
228: gl_FragDepth <= minDepth + epsilon)
229: { // Front peel:
230: // Clear the back color:
231: fragOutput0 = vec4(0.);
232:
233: // We store the front alpha value as (1-alpha) to allow MAX
234: // blending. This also means it is really initialized to 1,
235: // as it should be for under-blending.
236: front.a = 1. - front.a;
237:
238: // Use under-blending to combine fragment with front color:
239: fragOutput1.rgb = front.a * frag.a * frag.rgb + front.rgb;
240: // Write out (1-alpha):
241: fragOutput1.a = 1. - (front.a * (1. - frag.a));
242: }
243: else // (gl_FragDepth == maxDepth)
244: { // Back peel:
245: // Dump premultiplied fragment, it will be blended later:
246: frag.rgb *= frag.a;
247: fragOutput0 = frag;
248: }
249:
250:
251: //VTK::Picking::Impl
252:
253: // handle coincident offsets
254: //VTK::Coincident::Impl
255: }

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 462
vtkShaderProgram (0x7fffd965b5b0): 0:176(45): error: gl_PrimitiveID' undeclared 0:176(45): error: operands to arithmetic operators must be numeric 0:176(18): error: no function with name 'texelFetchBuffer' 0:177(41): warning: texColor’ used uninitialized
0:178(41): warning: texColor' used uninitialized 0:179(35): warning: texColor’ used uninitialized

[KSMAIN NORMAL MESSAGE] starting…
[KSMAIN NORMAL MESSAGE] …finished

I have installed Ubuntu on my windows 10 laptop computer (Graphic card: NVIDIA GeForce MX130 and Intel® UHD Graphics) and I also have Xming installed. What is causing the problem and how to fix it?

I tried running VTK-based applications with a GUI on WSL2 a few days ago and everything worked perfectly:

I’ve followed these instructions for setting up the GUI desktop (it is much simpler than most other tutorials that I’ve found, you just need to copy-paste 10-20 lines of code to the console):

2 Likes

There is nothing wrong with my vtk installation. Something is wrong with the opengl2 or something, I’m not sure.

So I have followed the instructions given here:
VTK - Users - For those using OpenGL2 in the VTK build. (nabble.com)
But the problem persists. Is there something that I would need to install besides the Xming?

But I have WSL1

Is there a specific reason not to upgrade to WSL2? As I wrote above, you can very easily set up WSL2 to run GUI applications, including complex VTK-based applications. You don’t even need Xming, but you can simply use standard Windows remote desktop client.

Yes, I’m using the Kassiopeia package which requires WSL1. Xming is needed for the root program.

What is Kassiopeia? WSL1 will be phased out, so probably Kassiopeia developers are already working on WSL2 compatibility and may already have at least a development version that you can use on WSL2.

What is this “root program”? Is there anything preventing you from using xrdp?

Correctly it was vtk that requires WSL1, not kassiopeia. Kassiopeia is a particle tracking software. I got this error message when I’m using WSL2:

ERROR: In /home/cstrid/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 277
vtkXOpenGLRenderWindow (0x564cff91d130): bad X server connection. DISPLAY=localhost:0.0.   
Aborting.


Aborted

You can set up the X server correctly (so that it works well with VTK) as described in the tutorial that I linked above. There are dozens of similar tutorials out there, I just mention this one, because it is proven to work with VTK and it is much easier compared to the others that I found.

I followed this tutorial How To Enable WSL2 Ubuntu GUI and use RDP to Remote - NEXTOFWINDOWS.COM, and I have enabled RDP to remote access. Should I now run vtk on the RDP ?

You can run VTK applications with interactive GUI using the remote desktop client. I guess it should be possible to use VTK via a WSL2 terminal, but probably you need to set the DISPLAY variable, something like this:

export DISPLAY=local:0.0