vtkWin32OpenGLRenderWindow: GLEW could not be initialized: Missing GL version

I meet a bug:

The code to reproduce this bug is:

vtkSmartPointer<vtkSphereSource> source = vtkSmartPointer<vtkSphereSource>::New();
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
vtkSmartPointer<vtkRenderer> render = vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renWin = vtkSmartPointer<vtkRenderWindow>::New();
vtkSmartPointer<vtkRenderWindowInteractor> iren = vtkSmartPointer<vtkRenderWindowInteractor>::New();

The environment is:

Windows Server 2019 Standard
VS 2022
Nvidia GeForce RTX 3070
Qt 5.12.4
vtk 9.1.0

Any suggestion is appreciated!

Your code can’t be right (vtkSmartPointer::New();). In any case, you have an OpenGL issue, update/fix your graphic drivers.

This is usually a formatting error (the markdown parser interprets <something> as an HTML tag. The solution is to put the source code between triple-backticks.

If driver update does not help then it is most likely due to using a server version of Windows. These operating systems work very differently from a regular desktop Windows. If you are trying to use the computer via remote desktop that is one extra level of complexity on top of all server oddities.

Windows Server may allow remote GPU usage in a way that desktop versions cannot do, but it may require special hardware (server-class GPU - not GeForce), drivers, and configuration.

Nvidia driver may block many features of a GeForce GPU because using such GPUs is legally not allowed in servers. One of the many reasons of why server-class GPUs are more expensive is that their license allows some shared usage.

1 Like

Thanks @lassoan , I’ve edited OP message.

1 Like

Thank you very much. It may caused by the server system operation and nvidia geforce gpu. I will change the geforce gpu or the system operation.