polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

crash while running polyscope under WSL

Open smason opened this issue 3 years ago • 0 comments

A colleague is trying to use Polyscope (via the Python wrappers) under WSL and it crashes in init when indirect rendering isn't disabled (I've been using it under Linux where it works great). The package has just been installed via pip and hence is using version 1.3.1 under Python 3.8.

>>> import polyscope as ps
>>> ps.init()
GLFW emitted error: GLX: Failed to create context: GLXBadFBConfig
GLFW emitted error: Cannot set swap interval without a current OpenGL or OpenGL ES context

This is immediately followed by a crash in glfwSetWindowPos. Running under GDB suggests this crash is unrelated and just due to not checking return of glfwCreateWindow for a nullptr:

https://github.com/nmwsharp/polyscope/blob/8e692da5a50c4da8b0dedaf941e1f2cef335fa11/src/render/opengl/gl_engine.cpp#L1679-L1682

These issues seem to be caused by indirect rendering imposing a hard limit of OpenGL version 1.4. This precludes most of the newer features Polyscope requires, hence the GLXBadFBConfig error.

I can create a pull request for the crash, but wondering if anyone has any suggestions about getting it using a GPU under Windows 10?

smason avatar May 12 '22 16:05 smason