-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with pyopengl !!! #86
Comments
I met this problem too. any solution? |
i found this problem cas caused by the mistake when i install the nvidia-driver, reinstall the driver make everything works as expected. |
@v-wewei How you install new driver? From run file? |
@v-wewei I also met this, are you running the code on a server machine? |
@lan786 @MengXinChengXuYuan |
I run into this problem on a kubernetes pod running Ubuntu 18.04.5 LTS. I assume Nvidia driver are installed correctly as I can use GPU computation and nvidia-smi. The error is EGL_BAD_MATCH=12297 and it is thrown by eglCreateContext. This function in my case was called here pyrender/pyrender/platforms/egl.py Line 186 in 94f1aa6
after several attempts I found that the problem was the OpenGL version. For some reason by default the machine was running version 3.3 but pyrender expects version 4.1 as for here: pyrender/pyrender/platforms/egl.py Line 156 in 94f1aa6
in theory my machine should have access to OpenGL 4.x but the version used is 3.3 (you can check with glxinfo). To fix this I had to use this macro in front of the script to run At this point I had another problem. My machine for some reason has GL_MAX_SAMPLES=1 which seems to be the upperbound on the number of samples for multisampling. In pyrender the number of samples is set to 4 in both line 1091 and 1096: Line 1091 in 94f1aa6
I had to change these two to 1. I have no clue why GL_MAX_SAMPLES is just 1. Should be much higher. |
@lcit Thanks! it works for me! |
@lcit thanks a lot! It works now! |
@lcit Thanks for your post! This solved all my issues in order to render over GPU |
Hi, @mmatl
i seem to always get the problem below,
Traceback (most recent call last):
File "test.py", line 31, in
r = pyrender.OffscreenRenderer(640, 480)
File "/home/v-wewei/anaconda3/envs/sdmaskrcnn/lib/python3.6/site-packages/pyrender/offscreen.py", line 32, in init
self._create()
File "/home/v-wewei/anaconda3/envs/sdmaskrcnn/lib/python3.6/site-packages/pyrender/offscreen.py", line 129, in _create
self._platform.init_context()
File "/home/v-wewei/anaconda3/envs/sdmaskrcnn/lib/python3.6/site-packages/pyrender/platforms.py", line 148, in init_context
EGL_NO_CONTEXT, context_attributes
File "/home/v-wewei/anaconda3/envs/sdmaskrcnn/lib/python3.6/site-packages/OpenGL/platform/baseplatform.py", line 402, in call
return self( *args, **named )
File "/home/v-wewei/anaconda3/envs/sdmaskrcnn/lib/python3.6/site-packages/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 12297,
baseOperation = eglCreateContext,
cArguments = (
<OpenGL._opaque.EGLDisplay_pointer object at 0x7ff8c4d6ee18>,
<OpenGL._opaque.EGLConfig_pointer object at 0x7ff8c4d6ed90>,
<OpenGL._opaque.EGLContext_pointer object at 0x7ff8c4da0b70>,
<OpenGL.arrays.lists.c_int_Array_7 object at 0x7ff8af5c9048>,
),
result = <OpenGL._opaque.EGLContext_pointer object at 0x7ff8c4902e18>
)
could you help to give me the solution for this opengl problem?
Thanks advance.
The text was updated successfully, but these errors were encountered: