Error initializing egl inside docker container based on libglvnd
Created by: mmmikael
I’m getting this error when calling eglInitialize
in a cudagl
docker container:
Traceback (most recent call last):
File "egl_context.py", line 12, in <module>
egl.eglInitialize(egl_display, pointer(major), pointer(minor))
File "/usr/local/lib/python3.6/dist-packages/PyOpenGL-3.1.3b2-py3.6.egg/OpenGL/platform/baseplatform.py", line 409, in __call__
return self( *args, **named )
File "/usr/local/lib/python3.6/dist-packages/PyOpenGL-3.1.3b2-py3.6.egg/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 12289,
baseOperation = eglInitialize,
cArguments = (
<OpenGL._opaque.EGLDisplay_pointer object at 0x7fef5cc2ae18>,
<OpenGL.arrays.arraydatatype.LP_c_int object at 0x7fef59c22ea0>,
<OpenGL.arrays.arraydatatype.LP_c_int object at 0x7fef59c22f28>,
),
result = 0
)
Any idea why this is happening?
I’m initializing egl this way:
import os
from ctypes import pointer
os.environ["PYOPENGL_PLATFORM"] = "egl"
import OpenGL.GL as gl
import OpenGL.EGL as egl
egl_display = egl.eglGetDisplay(egl.EGL_DEFAULT_DISPLAY)
major, minor = egl.EGLint(), egl.EGLint()
egl.eglInitialize(egl_display, pointer(major), pointer(minor))