pyrender icon indicating copy to clipboard operation
pyrender copied to clipboard

Write documentation: Getting Pyrender Working in Windows 10

Open GeorgeS2019 opened this issue 4 years ago • 8 comments
trafficstars

For Windows users We get warning that pyrender 1.4.5 currently supports only pyopengl 3.1.0 The standard way to install pyopengl is from Christoph Gohlke site. They are 3.1.5 for python 3.5+ The Gohlke pyopengl comes with freeglut.dll which is not supported by pyrender (EGL for Window)

I hope I have understood correctly. If not, please point out where are my mistakes

Using Gohlke 3.15 pyopengl and pyrender 1.4.5, I could not get the example duck.py to work

OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling

GeorgeS2019 avatar Apr 12 '21 12:04 GeorgeS2019

Odd, i downloaded pyrender from pip and it works fine on my win10 machine

SimantoR avatar Apr 20 '21 13:04 SimantoR

@SimantoR thanks for providing feedback :-) ==> please try setting

os.environ["PYOPENGL_PLATFORM"] = "egl" or

pyrender.OffscreenRenderer => which someone forces to work in egl mode only

@SimantoR => also please share which version of PyOpenGL and PyOpenGL.Accelerate U use and the source.

GeorgeS2019 avatar Apr 20 '21 13:04 GeorgeS2019

Could you provide code for reproducability? Preferably with the resources your loading as well?

SimantoR avatar Apr 20 '21 13:04 SimantoR

==> UPDATE

I could not get the example duck.py to work

OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling

It turns out I need to specify python to run under Nvidia graphics card and not the integrated graphics card with graphics driver problem.

GeorgeS2019 avatar Apr 20 '21 13:04 GeorgeS2019

@SimantoR

Could you provide code for reproducability? Preferably with the resources your loading as well?

I am using the default example provided. I spent many hours testing pyrender in both windows and WSL environment with Xserver. In my experience, my integrated graphic card driver tends to be corrupted and setting python to run only in Nvidia graphics card seems to solve most of the problems

I am using this issue to share the problems I encounter so others could avoid.

GeorgeS2019 avatar Apr 20 '21 14:04 GeorgeS2019

I'm using PyOpenGL 3.1.0 which i think came as a dependency of Pyrender

SimantoR avatar Apr 20 '21 14:04 SimantoR

I spent many hours testing pyrender in both windows and WSL environment with Xserver.

Hi mate, could you tell me how you " specify python to run under Nvidia graphics card and not the integrated graphics card"?

I am facing this problem: ImportError: ('Unable to load EGL library', 22, None, 126, None, 'EGL', None)

Rennylex avatar Dec 19 '21 08:12 Rennylex

I meet this problem too. But when the GPU is available, this problem is solved. Maybe some version of PyOpenGL don't support CPU function.

ghost avatar Mar 24 '23 00:03 ghost