Error GLSL 1.50 is not supported.

Hello people,

I’m new on this site. I am getting an error when trying to run a simple vtk representation program.
The error is
“error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES”
I use VTK8.0. Information on my computer:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Version: 18.0.5
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30

The program is

#include “vtkActor.h”
#include “vtkRenderer.h”
#include “vtkPolyData.h”
#include “vtkPolyDataMapper.h”
#include “vtkProperty.h”
#include <vtkRenderingOpenGL2Module.h>
#include <vtkInteractionStyleModule.h>
#include <vtkGenericDataObjectReader.h>
#include
#include <QVTKOpenGLWidget.h>
#include <vtkGenericOpenGLRenderWindow.h>
#include <vtkAutoInit.h>

VTK_MODULE_INIT (vtkRenderingOpenGL2);
VTK_MODULE_INIT (vtkInteractionStyle);

int main(int argc, char** argv)
{
QApplication app( argc, argv );
QVTKOpenGLWidget widget;
widget.resize(640,384);

vtkGenericDataObjectReader *objectReader = vtkGenericDataObjectReader::New();
objectReader->SetFileName("kube.vtk");
objectReader->Update();

vtkPolyData*  g_poly_data  = vtkPolyData::New ();
g_poly_data = objectReader->GetPolyDataOutput();

vtkGenericOpenGLRenderWindow *renderWindow =    vtkGenericOpenGLRenderWindow::New();

vtkRenderer *renderer = vtkRenderer::New();

vtkPolyDataMapper* g_mapper = vtkPolyDataMapper::New();
g_mapper ->SetInputData (g_poly_data);

vtkActor *actor = vtkActor::New();
actor ->SetMapper(g_mapper);
actor->GetProperty()->SetColor (1,0,0);
actor->GetProperty()->SetRepresentationToSurface();

renderer->AddActor(actor);
renderer->SetBackground(0.2, 0.4, 0.8);

renderWindow->AddRenderer(renderer);

widget.SetRenderWindow(renderWindow);
widget.show();
app.exec();

renderWindow->Delete();
renderer->Delete();
actor->Delete();
g_mapper->Delete();

return 0;
}

Any suggestion is appreciated.

Did you ever find a solution or a workaround?

When I got this error running someone else’s program I found that it worked if I set this:

MESA_GL_VERSION_OVERRIDE=3.2

2 Likes

Thanks for your commit. I succeed with this line.

HI! I have a similar error: https://stackoverflow.com/questions/66087438/regarding-glsl-support-for-running-pybullet-in-virtual-box

Can you help me solve it?

Sorry, gentlemen, but it looks as if this doesn’t work for me. I’m still getting the same error report

vtkShaderProgram.cxx:438 ERR| vtkShaderProgram (0x55586f825990): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES

trying to compile the following test example
https://kitware.github.io/vtk-examples/site/Python/GeometricObjects/CylinderExample/

I’m on Debian

5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux

glxinfo | grep OpenGL

gives

Mesa 20.3.5 implementation error: Invalid GLSL version in shading_language_version()
Please report at Issues · Mesa / mesa · GitLab
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics (ILK)
OpenGL core profile version string: 3.2 (Core Profile) Mesa 20.3.5
OpenGL core profile shading language version string: (null)
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
Mesa 20.3.5 implementation error: Invalid GLSL version in shading_language_version()
Please report at Issues · Mesa / mesa · GitLab
OpenGL version string: 3.2 (Compatibility Profile) Mesa 20.3.5
OpenGL shading language version string: (null)
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions: