polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

Polyscope OpenGL Error! Type: Invalid enum

Open gdwei opened this issue 4 years ago • 1 comments

[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 3.3 (Core Profile) Mesa 20.0.8 [polyscope] Polyscope OpenGL Error! Type: Invalid enum GLError() after shader compilation! Program text:

// tag ${ GLSL_VERSION }$ // from rule: GLSL_VERSION #version 330 core

  in vec3 a_position;
  out vec2 tCoord;

  void main()
  {
      tCoord = (a_position.xy+vec2(1.0,1.0))/2.0;
      gl_Position = vec4(a_position,1.);
  }

Traceback (most recent call last): File "/userhome/37/gdwei/geolearning/IGR/code/reconstruction/playground.py", line 8, in ps.init() File "/userhome/37/gdwei/anaconda3/envs/neuralpull/lib/python3.9/site-packages/polyscope/core.py", line 12, in init psb.init(backend) RuntimeError: OpenGl error occurred. Text: Invalid enum

gdwei avatar Nov 23 '21 06:11 gdwei

Hi! This is most likely some kind of driver / environment problem. Compiling that shader just happens to be the first thing that fails.

I've seen issues with Mesa driver in the past, usually the culprit has been that the driver does not actually support the necessary openGL version. For instance, trying to use Polyscope in a VM that doesn't support hardware rendering---this causes Mesa to fallback to a software implementation, which doesn't actually fully support OpenGL 3.3 Core or something like that.

Can you share the output of glxinfo | grep OpenGL on your machine?

If you're looking for a quick fix, the solution is probably to use some other graphics driver. If you're trying to run Polyscope in something like a VM that doesn't actually support hardware graphics, you are probably out of luck, I've never seen this work.

nmwsharp avatar Nov 24 '21 22:11 nmwsharp