Giter VIP home page Giter VIP logo

Comments (9)

mmatl avatar mmatl commented on May 31, 2024

Which offscreen renderer are you using (pyglet, EGL, osmesa)?

from pyrender.

flugenheimer avatar flugenheimer commented on May 31, 2024

I tried egl and osmesa.

I just tried using the script and model from the quickstart "minimal example of offscreen rendering" and when i run it using either egl or osmesa i get the following error
OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling
maybe i did not install something correctly?

Sorry for the rookie questions - 3D rendering is a new area for me.

from pyrender.

mmatl avatar mmatl commented on May 31, 2024

No stress! Make sure to follow the instructions for installing OSMesa if you're using that (see here: https://pyrender.readthedocs.io/en/latest/install/index.html#getting-pyrender-working-with-osmesa). For EGL, some NVIDIA drivers work with it, while some don't - it can be a bit finnicky.

from pyrender.

mmatl avatar mmatl commented on May 31, 2024

@flugenheimer Were you able to fix your issue?

from pyrender.

staceycy avatar staceycy commented on May 31, 2024

Hi @mmatl ,

I ran into the same problem.
Attached is my code:
py_render.txt

  • It gives following error when I use a monitor:

    File "/home/user/anaconda3/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 407, in call
    self.name, self.name,
    OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling

  • It gives following errors when I use SSH:

    File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 347, in init
    self._init_and_start_app()
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 995, in _init_and_start_app
    height=self._viewport_size[1])
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/xlib/init.py", line 170, in init
    super(XlibWindow, self).init(*args, **kwargs)
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/init.py", line 592, in init
    config = screen.get_best_config(config)
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/canvas/base.py", line 197, in get_best_config
    raise window.NoSuchConfigException()
    pyglet.window.NoSuchConfigException

Could you please help to give some advice?
Thanks.

from pyrender.

flugenheimer avatar flugenheimer commented on May 31, 2024

@mmatl: I tried installing osmesa again first by using the .deb file, which did not solve the issue, and then by building it from source, which also did not help.

so i am still kind of stuck - is there another way to test if it has been installed correctly?

from pyrender.

flugenheimer avatar flugenheimer commented on May 31, 2024

Also tried it on another pc with a GTX 1080, with driver: 390.116

could not get EGL to work

from pyrender.

liwenssss avatar liwenssss commented on May 31, 2024

Hi @mmatl ,

I ran into the same problem.
Attached is my code:
py_render.txt

  • It gives following error when I use a monitor:
    File "/home/user/anaconda3/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 407, in call
    self.name, self.name,
    OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling
  • It gives following errors when I use SSH:
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 347, in init
    self._init_and_start_app()
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyrender/viewer.py", line 995, in _init_and_start_app
    height=self._viewport_size[1])
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/xlib/init.py", line 170, in init
    super(XlibWindow, self).init(*args, **kwargs)
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/window/init.py", line 592, in init
    config = screen.get_best_config(config)
    File "/home/user/anaconda3/lib/python3.7/site-packages/pyglet/canvas/base.py", line 197, in get_best_config
    raise window.NoSuchConfigException()
    pyglet.window.NoSuchConfigException

Could you please help to give some advice?
Thanks.

hello, have you solved the second error, I got the same error and don't know solve it.

from pyrender.

HaFred avatar HaFred commented on May 31, 2024
os.environ['PYOPENGL_PLATFORM'] = 'egl'

For those who try to do offscreen like me with this line, might get this error above. Removing this line helps.

from pyrender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.