# Can't visualize with open-gl on x-client

**URL:** <https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840>\
**Category:** Development\
**Created:** [December 5, 2023, 1:12am UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840 "2023-12-05T01:12:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafael\_Scatena](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rafael_scatena/32/7820_2.png) [@Rafael\_Scatena](https://discourse.vtk.org/u/Rafael_Scatena)\
**Post date:** [December 5, 2023, 1:12am UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/1 "2023-12-05T01:12:01Z")

</div>

– Found OpenGL: /usr/lib/x86\_64-linux-gnu/libOpenGL.so found components: OpenGL GLX  
– Found OpenGL: /usr/lib/x86\_64-linux-gnu/libOpenGL.so  
– OpenGL found:  
– Version:  
– Include Path: /usr/include  
– Libraries: /usr/lib/x86\_64-linux-gnu/libOpenGL.so;/usr/lib/x86\_64-linux-gnu/libGLX.so;/usr/lib/x86\_64-linux-gnu/libGLU.so

2023-12-04 21:30:34.664 ( 0.597s) [7FF583434500]vtkXOpenGLRenderWindow.:256 ERR| vtkXOpenGLRenderWindow (0x55f79f54b640): Could not find a decent config

2023-12-04 21:30:34.664 ( 0.597s) [7FF583434500]vtkXOpenGLRenderWindow.:476 ERR| vtkXOpenGLRenderWindow (0x55f79f54b640): Could not find a decent visual

code:

#include \<vtkPolyData.h\>  
#include \<vtkNamedColors.h\>  
#include \<vtkRenderer.h\>  
#include \<vtkRenderWindow.h\>  
#include \<vtkRenderWindowInteractor.h\>  
#include \<vtkPolyDataMapper.h\>  
#include \<vtkActor.h\>

#include \<vtkSmartPointer.h\>  
#include \<vtkObject.h\>

#include \<vtkImageActor.h\>  
#include \<vtkNamedColors.h\>  
#include \<vtkInteractorStyleImage.h\>  
//#include \<vtkImporterType.h\>  
#include \<vtkProperty.h\>  
#include \<vtkPolyDataNormals.h\>

// OPENGL TEST  
#include \<vtkConeSource.h\>

void OpenGLTest()  
{  
// Create a cone using VTK  
vtkSmartPointer coneSource = vtkSmartPointer::New();

```
// Create a mapper
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(coneSource->GetOutputPort());

// Create an actor
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);

// Create a renderer
vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
renderer->AddActor(actor);

// Create a render window
vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);

// Create an interactor
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
    vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);

// Initialize rendering and start the event loop
renderWindow->Render();
renderWindowInteractor->Start();

```

}  
[CMakeLists.txt](https://discourse.vtk.org/uploads/short-url/j6ihMjQxAJkCjZ69MkqMyEOp73l.txt) (4.2 KB)

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [December 5, 2023, 1:23pm UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/2 "2023-12-05T13:23:05Z")

</div>

Is this a remote glx client? VTK requires OpenGL 3.2, which isn’t possible with remote glx.

---

<div class="post-metadata">

**Author:** ![Rafael\_Scatena](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rafael_scatena/32/7820_2.png) [@Rafael\_Scatena](https://discourse.vtk.org/u/Rafael_Scatena)\
**Post date:** [December 5, 2023, 3:29pm UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/3 "2023-12-05T15:29:42Z")

</div>

Hello,

Thanks a lot. Do you know if I am able to use opengl 3.2 on a server?

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [December 5, 2023, 3:37pm UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/4 "2023-12-05T15:37:13Z")

</div>

Yes, you can use OpenGL 3.2 on a server if you do off-screen rendering. Can you describe in more detail what you are trying to do?

---

<div class="post-metadata">

**Author:** ![Rafael\_Scatena](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rafael_scatena/32/7820_2.png) [@Rafael\_Scatena](https://discourse.vtk.org/u/Rafael_Scatena)\
**Post date:** [December 5, 2023, 3:49pm UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/5 "2023-12-05T15:49:38Z")

</div>

Hi,

I am using x2go to log in our linux server to build a c++ project. Our server has a Nvidia Quad graphics card.

Right now I am just trying to run the rendering test that consists in rendering a cone.

The initial project I am going to use itk to open a segmentation file and vtk to convert it to a polygon mesh.

I can’t install the opengL drivers. I have to ask the technichian to install them.

Anything more specific?

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [December 5, 2023, 3:56pm UTC](https://discourse.vtk.org/t/cant-visualize-with-open-gl-on-x-client/12840/6 "2023-12-05T15:56:58Z")

</div>

I’ve never used x2go. Is it documented anywhere that it supports OpenGL 3.2? Most remote viewing methods only support OpenGL 1.x, if they support OpenGL at all.

Installing OpenGL drivers will probably not fix the situation. You need to verify that x2go will work with OpenGL 3.2.
