Can't initialize polyscope after creating OffscreenRenderer
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Describe the issue
I have been trying to run polyscope after I have used open3d OffscreenRenderer in my script and when I run:
`polyscope.init()`
I get :
`RuntimeError: [polyscope] ERROR: Failed to initialize glfw`
Even if I delete the OffScreenRenderer object I still cannot initialize polyscope, maybe something is missing in the clean-up of the object?
### Steps to reproduce the bug
```python
import open3d as o3d
import polyscope as ps
a = o3d.visualization.rendering.OffscreenRenderer(300,300)
try:
ps.init()
except:
del a
ps.init()
```
### Error message
`GLFW emitted error: Win32: Failed to register window class: Class already exists.
Traceback (most recent call last):
File "F:\gkopanas\python_envs\blender\lib\site-packages\IPython\core\interactiveshell.py", line 3378, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
ps.init()
File "F:\gkopanas\python_envs\blender\lib\site-packages\polyscope\core.py", line 14, in init
psb.init(backend)
RuntimeError: [polyscope] ERROR: Failed to initialize glfw`
### Expected behavior
I should be able to use polyscope or other packages that use glfw after at least I have cleaned-up open3d
### Open3D, Python and System information
```markdown
- Operating system: Windows 10 64-bit
- Python version: Python 3.9.2
- Open3D version: 0.14.1
- System architecture: x86
- Is this a remote workstation?: No
- How did you install Open3D?: pip
- Compiler version (if built from source):
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.