What is the relationship between EGL and OpenGL?

后端 未结 3 1051
攒了一身酷
攒了一身酷 2020-12-24 03:04

I\'m writing an implementation for OpenVG and OpenGL|ES in Go, both of which depend on the Khronos EGL API, supposedly to ease portability I guess.

I\'m writing an

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 03:40

    Does OpenGL use or depend on EGL?

    No. You can run OpenGL without EGL.

    But is possible to have EGL implementation capable to create desktop OpenGL context. That's because EGL's eglBindAPI(int api) allows EGL_OPENGL_API, EGL_OPENGL_ES_API, or EGL_OPENVG_API.

    But if you ask:

    Does OpenGL-ES use or depend on EGL?

    The answer is yes, but there are exceptions.

    Currently (2015), you have several implementations of OpenGL-ES that rely on EGL to create graphics context: Google ANGLE, PowerVR, ARM MALI, Adreno, AMD, Mesa, etc.

    But on recent releases of NVIDIA and Intel drivers you can also request OpenGL-ES contexts directly, where extensions WGL_EXT_create_context_es_profile and WGL_EXT_create_context_es2_profile are available (Windows). Same thing on Unix platforms where GLX_EXT_create_context_es_profile and GLX_EXT_create_context_es2_profile extensions are available.

    The intent of EGL is to ease developers' lives by creating a portable and standard way to initialize and get context of supported graphics API, without worrying about platform specific issues, as WGL, GLX, etc. That is a problem of EGL implementers, not final programmer.

提交回复
热议问题